Bug 129 - LDFLAGS is ignored by make
LDFLAGS is ignored by make
Status: RESOLVED FIXED
Product: Mktemp
Classification: Unclassified
Component: Build
1.5
All Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-05 06:03 MST by Henning Seemann
Modified: 2008-08-17 11:35 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Seemann 2004-02-05 06:03:21 MST
According to "./configure --help" LDFLAGS can be set as environment variable
before calling ./configure to modify linking.
If LDFLAGS is defined, the value is added to Makefile. But LDFLAGS is ignored in
the linking target:

$(PROG): $(OBJS)
            $(CC) -o $@ $(OBJS) $(LIBS)

should be (in Makefile.in)

$(PROG): $(OBJS)
            $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

As a workaround LIBS can be used to set linker flags.

The problem was found with mktemp 1.5 on SUSE Linux 9.0.