--- a/Makefile +++ b/Makefile @@ -52,12 +52,14 @@ endif # for some reason the .c files need it, else GNU_STACK=RWE -OPT_FLAGS := -O2 $(ASFLAGS) +# Gentoo's CFLAGS should be honored +OPT_FLAGS := $(CFLAGS) $(ASFLAGS) PTHREAD := -lpthread # define stripping of binaries/libs here, or set these on make's commandline, # else you'll loose the chpax flags! -LDFLAGS := -SHLDFLAGS := +# Gentoo's LDFLAGS should be honored +LDFLAGS := $(LDFLAGS) +SHLDFLAGS := $(LDFLAGS) ifndef RUNDIR RUNDIR := . endif