This is an automated email from the ASF dual-hosted git repository.
truckman pushed a commit to branch AOO418
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO418 by this push:
new ad2d53d Unbreak build on FreeBSD with clang 6.0 and newer. Clang 6
changed the its default C++ standard from C++98 to C++14 and our old code is
not prepared for that. Avoid the problem by adding the -std=gnu++98 compiler
flag.
ad2d53d is described below
commit ad2d53db9304bcb2d31095aea2cb19243381f609
Author: Don Lewis <[email protected]>
AuthorDate: Sat Apr 21 23:17:08 2018 +0000
Unbreak build on FreeBSD with clang 6.0 and newer. Clang 6 changed
the its default C++ standard from C++98 to C++14 and our old code
is not prepared for that. Avoid the problem by adding the -std=gnu++98
compiler flag.
Add the -fstack-protector compiler flag on FreeBSD INTEL and X86_64.
git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1829757
13f79535-47bb-0310-9956-ffa450edef68
---
main/solenv/gbuild/platform/freebsd.mk | 7 +++++++
main/solenv/inc/unxfbsd.mk | 7 ++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/main/solenv/gbuild/platform/freebsd.mk
b/main/solenv/gbuild/platform/freebsd.mk
index db8ab61..5095e60 100644
--- a/main/solenv/gbuild/platform/freebsd.mk
+++ b/main/solenv/gbuild/platform/freebsd.mk
@@ -94,6 +94,7 @@ gb_CXXFLAGS := \
-fno-use-cxa-atexit \
-fvisibility-inlines-hidden \
-fvisibility=hidden \
+ -std=gnu++98 \
-pipe
ifeq ($(COM),CLANG)
gb_CXXFLAGS += -DHAVE_STL_INCLUDE_PATH
@@ -144,6 +145,12 @@ gb_LinkTarget_LDFLAGS += \
endif
+ifneq ($(filter $(CPUNAME),INTEL X86_64),)
+gb_CFLAGS += -fstack-protector
+gb_CXXFLAGS += -fstack-protector
+gb_LinkTarget_LDFLAGS += -fstack-protector
+endif
+
ifeq ($(gb_DEBUGLEVEL),2)
gb_COMPILEROPTFLAGS := -O0
else
diff --git a/main/solenv/inc/unxfbsd.mk b/main/solenv/inc/unxfbsd.mk
index e2c938a..39103ee 100644
--- a/main/solenv/inc/unxfbsd.mk
+++ b/main/solenv/inc/unxfbsd.mk
@@ -96,11 +96,16 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
CFLAGS_NO_EXCEPTIONS=-fno-exceptions
# -fpermissive should be removed as soon as possible
-CFLAGSCXX= -pipe $(ARCH_FLAGS)
+CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++98
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
CFLAGSCXX += -fvisibility-inlines-hidden
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
+.IF "$(CPUNAME)" == "INTEL" || "$(CPUNAME)" == "X86_64"
+CFLAGSCC += -fstack-protector
+CFLAGSCXX += -fstack-protector
+.ENDIF
+
# Compiler flags for compiling static object in multi threaded environment
with graphical user interface
CFLAGSOBJGUIMT=
# Compiler flags for compiling static object in multi threaded environment
with character user interface