openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From truck...@apache.org
Subject svn commit: r1829757 - in /openoffice/trunk/main/solenv: gbuild/platform/freebsd.mk inc/unxfbsd.mk
Date Sat, 21 Apr 2018 23:17:08 GMT
Author: truckman
Date: Sat Apr 21 23:17:08 2018
New Revision: 1829757

URL: http://svn.apache.org/viewvc?rev=1829757&view=rev
Log:
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.


Modified:
    openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk
    openoffice/trunk/main/solenv/inc/unxfbsd.mk

Modified: openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk?rev=1829757&r1=1829756&r2=1829757&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/platform/freebsd.mk Sat Apr 21 23:17:08 2018
@@ -92,6 +92,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
@@ -142,6 +143,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
 gb_COMPILEROPT1FLAGS := -O0

Modified: openoffice/trunk/main/solenv/inc/unxfbsd.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unxfbsd.mk?rev=1829757&r1=1829756&r2=1829757&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/inc/unxfbsd.mk (original)
+++ openoffice/trunk/main/solenv/inc/unxfbsd.mk Sat Apr 21 23:17:08 2018
@@ -105,11 +105,16 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enfor
 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



Mime
View raw message