]> git.ipfire.org Git - pakfire.git/blob - macros/cflags.macro
Merge branch 'python3'
[pakfire.git] / macros / cflags.macro
1
2 # Export CFLAGS + CXXFLAGS
3 GLOBAL_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,D_GLIBCXX_ASSERTIONS
4 GLOBAL_CFLAGS += -Werror=format-security-fexceptions
5 GLOBAL_CFLAGS += -fPIC -fstack-protector-strong --param=ssp-buffer-size=4
6 GLOBAL_CFLAGS += -grecord-gcc-switches -fdebug-prefix-map=%{DIR_SRC}=%{debugsourcedir}
7
8 CFLAGS_i686 = -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fstack-clash-protection
9 CFLAGS_x86_64 = -m64 -mtune=generic -fstack-clash-protection
10 CFLAGS_aarch64 = -fstack-clash-protection
11 CFLAGS_armv5tel = -march=armv5te -mfloat-abi=soft
12 CFLAGS_armv7hl = -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -mthumb
13
14 export CFLAGS = %{GLOBAL_CFLAGS} %{CFLAGS_%{DISTRO_ARCH}}
15 export CXXFLAGS = %{CFLAGS}
16
17 export LDFLAGS = -Wl,-z,relro -Wl,-z,now