TEA 3.4 is missing LDFLAGS support
Closed / Fixed1403343fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2006-01-11 21:39:54
TEA 3.4 provides lots of support for CFLAGS, in tclconfig/tcl.m4, configure.in and Makefile.in, but the corresponding support for LDFLAGS is missing. Some changes are obvious to me, like adding LDFLAGS = @LDFLAGS@ to Makefile.in, but many are not (e.g should there be a separate SHLIB_LDFLAGS?). It also seems obvious to me that Jeff Hobbs could fix this "the right way" in his sleep. Using the sampleextension, this bug can be reproduced by doing: env CFLAGS="-isysroot $(SDK)" LDFLAGS="-Wl,-syslibroot,$(SDK)" ./configure Followed by a "make -n" to see that CFLAGS makes it and LDFLAGS doesn't. The example above is for building Mac OSX 10.3 binaries (both applications and shared libraries) on 10.4, but LDFLAGS=options is useful on other platforms as well.
hobbsplain2006-01-12 04:48:29
Logged In: YES user_id=72656 I'll look into this, but I wanted to note that the latest TEA in CVS has support for the universal OS X builds already.
gregcouchplain2006-01-12 05:05:47
Logged In: YES user_id=131838 More information. Universal OS X builds work for Tcl and Tk, but not for the sample extension (I believe tktable has the same problem). Also, with "configure --enable-symbols", the -g is not showing up on the link line.
hobbsplain2006-01-24 02:37:47
Logged In: YES user_id=72656 The latest tcl.m4 updates to TEA/sample should allow building on 10.4 without LDFLAGS being set. There are some special combinations that still require LDFLAGS to be passed through, but it's a bit of a quagmire in the m4 handling of LDFLAGS right now. Passing on to Daniel so he can comment on the special conditions.
dasplain2006-03-21 19:37:40
Logged In: YES user_id=90580 the darwin specific problem in TEA w.r.t LDFLAGS was that the TEA makefile has LDFLAGS_DEFAULT rather than LDFLAGS like the tcl makefile, so darwin SHLIB_LD had to be modified accordingly, a fix for this was committed on 23/1/06 to TEA tclconfig. as far as your example for building 10.3 binaries on 10.4 goes, that no longer works with the latest tools (Xcode 2.2.1), instead use export CFLAGS='-mmacosx-version-min=10.3 -isysroot /Developer/ SDKs/MacOSX10.3.9.sdk' (i.e. no LDFLAGS needed anymore anyway) universal builds are similar: export CFLAGS='-mmacosx-version-min=10.4 -arch ppc -arch ppc64 - arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk' these will work with latest 8.4 & HEAD tcl/tk core and TEA 3.5 extensions.
Log in (anonymous is fine) to add a comment.