--disable-shared doesn't set CFLAGS correctly
Closed / Fixed218386ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:56:58
OriginalBugID: 4660 Bug Version: 8.3 SubmitDate: '2000-03-28' LastModified: '2000-04-14' Severity: MED Status: Closed Submitter: techsupp ChangedBy: hobbs OS: HP-UX OSVersion: 10.20 FixedDate: '2000-10-25' ClosedDate: '2000-04-14' Name: Tom Lane ReproducibleScript: In the unix directory, do configure --disable-shared on a machine where SHLIB_CFLAGS is nonempty by default (for example, on HPUX with gcc it needs to contain "-fPIC" to generate code that can be put in a shlib). ObservedBehavior: The generated Makefile still has SHLIB_CFLAGS = -fPIC. DesiredBehavior: SHLIB_CFLAGS should be empty. I observed failure when trying to generate profilable code by selecting --enable-symbols and then changing -g to -pg in CFLAGS. This fails because -fPIC -pg is not a supported combination on this platform. But -fPIC shouldn't have been in there since I did --disable-shared too. (BTW, it'd be nice if -pg were one of the available configure options, but that's not the immediate problem.) Patch: It looks to me like Makefile.in should be substituting TCL_SHLIB_CFLAGS, not SHLIB_CFLAGS. This patch fixes it: *** unix/Makefile.in.orig Thu Feb 10 06:09:57 2000 --- unix/Makefile.in Tue Mar 28 17:20:07 2000 *************** *** 168,174 **** STLIB_LD = @STLIB_LD@ SHLIB_LD = @SHLIB_LD@ ! SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ #SHLIB_SUFFIX = --- 168,174 ---- STLIB_LD = @STLIB_LD@ SHLIB_LD = @SHLIB_LD@ ! SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ #SHLIB_SUFFIX = It looks like Tk needs the same change, except use @TK_SHLIB_CFLAGS@ PatchFiles: unix/Makefile.in for both Tcl and Tk. The user just needs to add the --disable-load command to prevent the use of -fPIC for gcc. -- 04/14/2000 hobbs
welch Closed ticket [218386ffff].
[History diff]2000-10-26 08:21:16
dgp Ticket [218386ffff]: 3 changes
[History diff]2001-04-05 06:54:27
Log in (anonymous is fine) to add a comment.