Overlay/games-strategy/0ad/files/0ad-12636_alpha11-gentoo.patch

136 lines
4.2 KiB
Diff

From: Julian Ospald <hasufell@gentoo.org>
Date: Sun Jun 24 18:32:38 UTC 2012
Subject: build system
respect flags
let stripping be handled by the system
fix minimal-flags option:
leave -fvisibility=hidden active
leave conditional -fpc-proprocess active
--- build/premake/premake4.lua
+++ build/premake/premake4.lua
@@ -135,7 +135,7 @@
function project_set_build_flags()
- flags { "Symbols", "NoEditAndContinue" }
+ flags { "NoEditAndContinue" }
if not _OPTIONS["icc"] and (os.is("windows") or not _OPTIONS["minimal-flags"]) then
-- adds the -Wall compiler flag
flags { "ExtraWarnings" } -- this causes far too many warnings/remarks on ICC
@@ -232,33 +232,19 @@
"-fno-omit-frame-pointer"
}
- if not _OPTIONS["without-pch"] then
- buildoptions {
- -- do something (?) so that ccache can handle compilation with PCH enabled
- -- (ccache 3.1+ also requires CCACHE_SLOPPINESS=time_macros for this to work)
- "-fpch-preprocess"
- }
- end
-
- if arch == "x86" or arch == "amd64" then
- buildoptions {
- -- enable SSE intrinsics
- "-msse"
- }
- end
if os.is("linux") or os.is("bsd") then
- linkoptions { "-Wl,--no-undefined", "-Wl,--as-needed" }
+ linkoptions { "-Wl,--no-undefined" }
end
- if arch == "x86" then
- buildoptions {
- -- To support intrinsics like __sync_bool_compare_and_swap on x86
- -- we need to set -march to something that supports them
- "-march=i686"
- }
- end
+ end
+ if not _OPTIONS["without-pch"] then
+ buildoptions {
+ -- do something (?) so that ccache can handle compilation with PCH enabled
+ -- (ccache 3.1+ also requires CCACHE_SLOPPINESS=time_macros for this to work)
+ "-fpch-preprocess"
+ }
end
if arch == "arm" then
@@ -281,13 +267,11 @@
end
end
- if not _OPTIONS["minimal-flags"] then
buildoptions {
-- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
-- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
"-fvisibility=hidden"
}
- end
-- X11 includes may be installed in one of a gadzillion of three places
-- Famous last words: "You can't include too much! ;-)"
--- libraries/fcollada/src/Makefile
+++ libraries/fcollada/src/Makefile
@@ -9,8 +9,8 @@
CXX ?= g++
CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
-CXXFLAGS_RELEASE := -O1 -DNDEBUG -DRETAIL
+CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
+CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
# (-O2 with gcc 4.3 causes linker errors when using this library, for unknown reasons, so stick with -O1)
CXXFLAGS_TEST := -O0 -g -D_DEBUG
LIBS += `pkg-config libxml-2.0 --libs`
--- build/premake/premake4/src/tools/gcc.lua
+++ build/premake/premake4/src/tools/gcc.lua
@@ -136,8 +136,6 @@
if not cfg.flags.Symbols then
if cfg.system == "macosx" then
table.insert(result, "-Wl,-x")
- else
- table.insert(result, "-s")
end
end
--- build/premake/premake4/build/gmake.unix/Premake4.make
+++ build/premake/premake4/build/gmake.unix/Premake4.make
@@ -26,9 +26,9 @@
DEFINES += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
INCLUDES += -I../../src/host/lua-5.1.4/src
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
- CFLAGS += $(CPPFLAGS) -Wall -Os
- CXXFLAGS += $(CPPFLAGS) -Wall -Os
- LDFLAGS += -s -rdynamic
+ CFLAGS += $(CPPFLAGS) -Wall
+ CXXFLAGS += $(CPPFLAGS) -Wall
+ LDFLAGS += -rdynamic
LIBS += -lm -ldl
RESFLAGS += $(DEFINES) $(INCLUDES)
LDDEPS +=
@@ -48,8 +48,8 @@
DEFINES += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
INCLUDES += -I../../src/host/lua-5.1.4/src
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
- CFLAGS += $(CPPFLAGS) -Wall -g
- CXXFLAGS += $(CPPFLAGS) -Wall -g
+ CFLAGS += $(CPPFLAGS) -Wall
+ CXXFLAGS += $(CPPFLAGS) -Wall
LDFLAGS += -rdynamic
LIBS += -lm -ldl
RESFLAGS += $(DEFINES) $(INCLUDES)
@@ -302,4 +302,4 @@
$(SILENT) $(CC) $(PCHINCLUDES) $(CFLAGS) -MF $(OBJDIR)/lauxlib.d -MT "$@" -o "$@" -c "$<"
-include $(OBJECTS:%.o=%.d)
--include $(GCH:%.h.gch=%.h.d)
\ No newline at end of file
+-include $(GCH:%.h.gch=%.h.d)