Skip to content

Commit

Permalink
build: add more default flags to $CFLAGS instead of $CFLAGS_AUTO
Browse files Browse the repository at this point in the history
This way we make sure the flags are in place when building
dependencies.
  • Loading branch information
martanne committed Apr 25, 2016
1 parent 73e6d7f commit 031a7be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,19 @@ Darwin) CFLAGS_STD="$CFLAGS_STD -D_DARWIN_C_SOURCE" ;;
AIX) CFLAGS_STD="$CFLAGS_STD -D_ALL_SOURCE" ;;
esac

tryflag CFLAGS_AUTO -pipe
tryflag CFLAGS -pipe

# Try flags to optimize binary size
tryflag CFLAGS_AUTO -Os
#tryflag CFLAGS_AUTO -ffunction-sections
#tryflag CFLAGS_AUTO -fdata-sections
tryflag CFLAGS -Os
#tryflag CFLAGS -ffunction-sections
#tryflag CFLAGS -fdata-sections
#tryldflag LDFLAGS_AUTO -Wl,--gc-sections

# Try hardening flags
tryflag CFLAGS_AUTO -fPIE
tryflag CFLAGS -fPIE
tryflag CFLAGS_AUTO -fstack-protector-all
tryldflag LDFLAGS_AUTO -Wl,-z,now
tryldflag LDFLAGS_AUTO -Wl,-z,relro
tryldflag LDFLAGS -Wl,-z,now
tryldflag LDFLAGS -Wl,-z,relro
#tryldflag LDFLAGS_AUTO -pie

printf "creating config.mk... "
Expand Down

0 comments on commit 031a7be

Please sign in to comment.