Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6f45bd010802faa90c639008b40272626601328a
Ticket: 218386ffffffffffffffffffffffffffffffffff
--disable-shared doesn't set CFLAGS correctly
User & Date: nobody on 2000-10-26 00:56:58
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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
    
  4. foundin changed to: "obsolete: 8.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "75. Tutorial"
  10. title changed to: "--disable-shared doesn't set CFLAGS correctly"
  11. type changed to: "Bug"