Closed Bug 23870 Opened 26 years ago Closed 26 years ago

inconsistent uses of CFLAGS / CXXFLAGS / LDFLAGS

Categories

(SeaMonkey :: Build Config, defect, P3)

Sun
Solaris

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmosedale, Assigned: cls)

References

Details

Attachments

(1 file)

The fix to 20254 has exposed some odd inconsistencies and breakage in the build system. This is actually a general UNIX/autoconf issue, not just Sun/Solaris. The symptoms: using Sun Workshop 5, running configure with CXX="CC" CFLAGS="-compat=4" generates Makefiles that won't build. What's happening is that "-compat=4" causes binaries with a different vtable layout to be generated, so "-compat=4" needs to known to the linker as well. There is a workaround: use CXX="CC -compat=4". The problem is that the top-level configure.in stuffs $(CFLAGS) into $(LDFLAGS), which is I think incorrect behavior. Sometimes LDFLAGS is used on C link lines, and sometimes on CXX link lines. To see the more standard way to deal with this, see the LINK.c and LINK.cc definitions in the output of "gmake -p". They explicitly include CFLAGS and CXXFLAGS in the respective link lines, rather than assuming that LDFLAGS will have appropriate flags set already. As such, I would propose a) removing the $CFLAGS from the LDFLAGS definition at around line 3014 in the top-level configure.in b) causing the definitions to set MKSHLIB and MKCSHLIB to explicitly include CXXFLAGS and CFLAGS respectively (and presumably change c) deprecate using LINK, and move towards using LINK.cc and LINK.c Additionally, some lower-level Makefile.in's are depending on the existing behavior. One example is webshell/tests/viewer/Makefile.in: the definitions for $(PROGRAM)_gtk and friends are an example. Though in that particular case, it's unclear to me why the link lines are explicitly specified there at all: the auxiliary libraries could presumably be stuffed into $(EXTRA_LIBS) and the rules inherited.
Status: NEW → ASSIGNED
Target Milestone: M15
Blocks: 35127
The patch has been checked in.
I do not believe there's any way to generalize the targets for the toolkit specific viewers in webshell/tests/viewer short of using automake. CXXFLAGS were added to each of those targets. Marking fix.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: