Don't build static bins with PIE, only for dynamic.
This commit is contained in:
parent
8dc6926664
commit
fcbe7f113b
4
configure
vendored
4
configure
vendored
@ -203,9 +203,7 @@ check_compiler_flag()
|
|||||||
local var="$3"
|
local var="$3"
|
||||||
local rv=0
|
local rv=0
|
||||||
|
|
||||||
if [ -z "$var" ]; then
|
[ -z "$var" ] && var="CFLAGS"
|
||||||
var="CFLAGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "Checking if $CC supports -${mode}${flag} ... "
|
printf "Checking if $CC supports -${mode}${flag} ... "
|
||||||
cat <<EOF >_ccflag.c
|
cat <<EOF >_ccflag.c
|
||||||
|
4
prog.mk
4
prog.mk
@ -1,7 +1,6 @@
|
|||||||
-include $(TOPDIR)/config.mk
|
-include $(TOPDIR)/config.mk
|
||||||
|
|
||||||
OBJS ?= main.o
|
OBJS ?= main.o
|
||||||
CFLAGS += $(PROG_CFLAGS)
|
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: $(BIN) $(BIN).static
|
all: $(BIN) $(BIN).static
|
||||||
@ -40,5 +39,6 @@ $(BIN).static: $(OBJS)
|
|||||||
|
|
||||||
$(BIN): $(OBJS)
|
$(BIN): $(OBJS)
|
||||||
@printf " [CCLD]\t\t$@\n"
|
@printf " [CCLD]\t\t$@\n"
|
||||||
${SILENT}$(CC) $^ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(PROG_LDFLAGS) -o $@
|
${SILENT}$(CC) $^ $(CPPFLAGS) $(CFLAGS) $(PROG_CFLAGS) \
|
||||||
|
$(LDFLAGS) $(PROG_LDFLAGS) -o $@
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user