[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

don't process $(LDFLAGS) with prefix-args

From: Paul Jarc
Subject: don't process $(LDFLAGS) with prefix-args
Date: Wed, 26 Mar 2003 17:31:50 -0500
User-agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux)

Earlier versions of Emacs had a bug where user-supplied $(LDFLAGS)
would be processed by prefix-args when building temacs.  The bug was
fixed for 21.2 (or perhaps earlier), but it's back again in 21.3.

User-supplied $(LDFLAGS) is used with both $(CC) and, when building
temacs, $(LD).  Since it's used with $(CC), it may already contain
-Wl, or -Xlinker arguments.  So if $(LD) is $(CC) (with or without
-nostdlib), $(LDFLAGS) should not be re-escaped with -Xlinker.

If $(LD) is ld, then (currently) you're stuck; you can't pass anything
in $(LDFLAGS) except what is intelligible to both $(CC) and ld
directly.  This could be fixed by using prefix-args whenever we pass
$(LDFLAGS) to $(CC), but not when we pass $(LDFLAGS) to ld; then the
instructions would have to tell users to pass flags as they should
appear to ld, instead of as they should appear to $(CC).

The Makefile could be made to work this way on all systems: use
prefix-args whenever we pass $(LDFLAGS) to $(CC) (including when we
pass it to $(LD), on systems where $(LD) is $(CC)), but not when we
pass it to $(LD) if $(LD) is ld.  This is a tradeoff between
consistency across platforms and similarity with other packages on
systems where $(LD) is $(CC).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]