Skip to content

Commit

Permalink
Defer expansion of variable shared.ldflags
Browse files Browse the repository at this point in the history
Fixes issue #64 ("shared.ldflags broken when building with
helper-library"), a regression introduced with commit
a6975e9 ("Reorder makefile sections"). Name of shared.lib was no
longer expanded after reordering sections.
  • Loading branch information
katjav committed Mar 11, 2020
1 parent 3eb4832 commit e6cff66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.pdlibbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ ifeq ($(system), Linux)
cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags
cxx.ldlibs := -lc -lm -lstdc++
shared.extension = so
shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib)
shared.ldflags = -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib)
endif


Expand Down Expand Up @@ -648,7 +648,7 @@ depcheck.flags := $(cpp.flags) $(cflags)
LDFLAGS := $(arch.ld.flags)

# now add the same ld flags to shared dynamic lib
shared.ldflags := $(shared.ldflags) $(LDFLAGS)
shared.ldflags += $(LDFLAGS)

# accumulated flags for C compiler / linker
c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS)
Expand Down

0 comments on commit e6cff66

Please sign in to comment.