Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2006-03-21
19:37 • Closed ticket [1403343fff]: TEA 3.4 is missing LDFLAGS support plus 7 other ... artifact: 792d4a0d37 user: das
2006-01-24
02:37 • Ticket [1403343fff]: 5 changes artifact: 220ad06fab user: hobbs
2006-01-12
05:05 • Ticket [1403343fff]: 4 changes artifact: 9e815e7f23 user: gregcouch
04:48 • Ticket [1403343fff]: 5 changes artifact: c1b218b90d user: hobbs
2006-01-11
21:39 • New ticket [1403343fff]. artifact: 12c777b3d4 user: gregcouch

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.