Skip to content

Commit

Permalink
Makefile: use ${LD} or ${CROSS}ld instead of ld (radareorg#9720)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnbr authored and XVilka committed Mar 19, 2018
1 parent d6e3036 commit 5151ebb
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions mk/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2
CFLAGS_OPT3=-O3
CFLAGS_DEBUG=-g
LD?=ld

ifeq ($(OSTYPE),darwin)
ARCH=$(shell uname -m)
#CFLAGS+=-arch ${ARCH}
#LDFLAGS+=-arch ${ARCH}
PARTIALLD=ld -r -all_load
PARTIALLD=${LD} -r -all_load
CFLAGS+=-fno-common
LDFLAGS_LIB=-dynamiclib
LDFLAGS_SONAME=-Wl,-install_name,${LIBDIR}/
else
PARTIALLD=ld -r --whole-archive
PARTIALLD=${LD} -r --whole-archive
LDFLAGS_LIB=${LDFLAGS} -shared
#ifneq (${NAME},)
#LDFLAGS_LIB+=-Wl,-soname,lib${NAME}.${EXT_SO}.${VERSION}
Expand Down
2 changes: 1 addition & 1 deletion mk/i486-mingw32-gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ONELIB=0
LINK=-shared
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=ld -r --whole-archive
PARTIALLD=${CROSS}ld -r --whole-archive
PICFLAGS=
CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
Expand Down
2 changes: 1 addition & 1 deletion mk/i586-mingw32-gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OSTYPE=windows
LINK=-shared
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=ld -r --whole-archive
PARTIALLD=${CROSS}ld -r --whole-archive
PICFLAGS=
CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
Expand Down
2 changes: 1 addition & 1 deletion mk/i586-mingw32msvc-gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OSTYPE=windows
LINK=
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=ld -r --whole-archive
PARTIALLD=${CROSS}ld -r --whole-archive
PICFLAGS=
CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
Expand Down
2 changes: 1 addition & 1 deletion mk/i686-pc-mingw32-gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OSTYPE=windows
LINK=
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=ld -r --whole-archive
PARTIALLD=${CROSS}ld -r --whole-archive
PICFLAGS=
CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
Expand Down
2 changes: 1 addition & 1 deletion mk/i686-w64-mingw32-gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OSTYPE=windows
LINK=
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=ld -r --whole-archive
PARTIALLD=${CROSS}ld -r --whole-archive
PICFLAGS=
CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
Expand Down
2 changes: 1 addition & 1 deletion mk/i686-w64-mingw32.static-gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OSTYPE=windows
LINK=
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=ld -r --whole-archive
PARTIALLD=${CROSS}ld -r --whole-archive
PICFLAGS=
CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
Expand Down
2 changes: 1 addition & 1 deletion mk/ios-sdk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OSTYPE=darwin
LINK=
AR=ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=ld -r -all_load
PARTIALLD=${CORSS}ld -r -all_load
PICFLAGS=
CFLAGS+=${PICFLAGS}
CC_LIB=${CC} -shared -o
Expand Down
5 changes: 3 additions & 2 deletions mk/tcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2
CFLAGS_OPT3=-O3
LD?=ld

ifeq ($(OSTYPE),darwin)
PARTIALLD=ld -r -all_load
PARTIALLD=${LD} -r -all_load
LDFLAGS_LIB=-dynamiclib
LDFLAGS_SONAME=-Wl,-install_name,
else
PARTIALLD=ld -r --whole-archive
PARTIALLD=${LD} -r --whole-archive
LDFLAGS_LIB=-shared
LDFLAGS_LIB+=-Dxx
#Wl,-soname,lib${NAME}.${EXT_SO}.${VERSION}
Expand Down

0 comments on commit 5151ebb

Please sign in to comment.