79 lines
2.9 KiB
Diff
79 lines
2.9 KiB
Diff
Description: improved support for build flags
|
|
The first change makes linking makeHeader use the same CPP/CXX/LD flags as the
|
|
rest of the sources.
|
|
The second change stops btyacc/Makefile from ignoring CFLAGS from the
|
|
environment.
|
|
The third change stops overriding CXXFLAGS
|
|
The result is using hardening flags from the environment when compiling and
|
|
linking.
|
|
Author: Damyan Ivanov <dmn@debian.org>
|
|
|
|
--- a/builds/posix/Makefile.in
|
|
+++ b/builds/posix/Makefile.in
|
|
@@ -623,7 +623,7 @@ MAKE_HEADER_Src = $(addprefix $(SRC_ROOT
|
|
MAKE_HEADER_Bin = ./makeHeader
|
|
|
|
$(INCLUDE_DEST)/ibase.h: $(SRC_IBASE_ExtraFiles)
|
|
- $(STATICEXE_LINK) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src)
|
|
+ $(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $(LINK_OPTS) $(CPPFLAGS) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src)
|
|
$(CP) $^ .
|
|
$(MAKE_HEADER_Bin) <ibase.h >$@
|
|
$(RM) -f ibase.h
|
|
--- a/extern/btyacc/Makefile
|
|
+++ b/extern/btyacc/Makefile
|
|
@@ -42,7 +42,7 @@ OTHERS = README README.BYACC \
|
|
all: $(PROGRAM)
|
|
|
|
$(PROGRAM): $(OBJS) $(LIBS)
|
|
- $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
|
|
|
|
clean:; rm -f $(OBJS)
|
|
|
|
--- a/builds/posix/make.defaults
|
|
+++ b/builds/posix/make.defaults
|
|
@@ -166,8 +166,8 @@ LD = @CXX@
|
|
|
|
LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS)
|
|
STATICLIB_LINK = $(AR) crus
|
|
-EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS)
|
|
-STATICEXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS)
|
|
+EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(LDFLAGS)
|
|
+STATICEXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(LDFLAGS)
|
|
|
|
LINK_LIBS = @LIBS@
|
|
STATICLINK_LIBS = @LIBS@
|
|
--- a/builds/posix/prefix.linux
|
|
+++ b/builds/posix/prefix.linux
|
|
@@ -19,7 +19,7 @@
|
|
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
|
|
|
|
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0 -fno-delete-null-pointer-checks
|
|
-CXXFLAGS=-std=gnu++03
|
|
+CXXFLAGS+=-std=gnu++03
|
|
OPTIMIZE_FLAGS=-O3 -march=i586 -mtune=i686 -fno-omit-frame-pointer
|
|
WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -Wno-narrowing
|
|
|
|
--- a/builds/posix/prefix.linux_amd64
|
|
+++ b/builds/posix/prefix.linux_amd64
|
|
@@ -19,7 +19,7 @@
|
|
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
|
|
|
|
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 -fno-delete-null-pointer-checks
|
|
-CXXFLAGS=-std=gnu++03
|
|
+CXXFLAGS+=-std=gnu++03
|
|
OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer
|
|
WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -Wno-invalid-offsetof -Wno-narrowing -Wno-unused-local-typedefs
|
|
|
|
--- a/builds/posix/prefix.linux_generic
|
|
+++ b/builds/posix/prefix.linux_generic
|
|
@@ -19,7 +19,7 @@
|
|
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
|
|
|
|
COMMON_FLAGS=-DLINUX -pipe -MMD -fPIC -DFB_SEND_FLAGS=MSG_NOSIGNAL -fno-delete-null-pointer-checks
|
|
-CXXFLAGS=-std=gnu++03
|
|
+CXXFLAGS+=-std=gnu++03
|
|
|
|
PROD_FLAGS=-ggdb -O3 $(COMMON_FLAGS)
|
|
DEV_FLAGS=-ggdb -p -Wall -Wno-switch $(COMMON_FLAGS) -Wno-non-virtual-dtor
|