Author: mlytwyn
Date: Wed Dec  9 20:27:58 2015
New Revision: 39223

URL: http://svn.gna.org/viewcvs/gnustep?rev=39223&view=rev
Log:
Clang on CentOS 6.5 Linux creates exe's that crash due to unaligned stack 
pointers

Modified:
    tools/make/trunk/common.make

Modified: tools/make/trunk/common.make
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/common.make?rev=39223&r1=39222&r2=39223&view=diff
==============================================================================
--- tools/make/trunk/common.make        (original)
+++ tools/make/trunk/common.make        Wed Dec  9 20:27:58 2015
@@ -594,7 +594,27 @@
 # what can be done about it.
 INTERNAL_OBJCFLAGS = -fno-strict-aliasing
 
+# Linux CentOS 6.5 i386 clang...
+# Clang inserts move aligned packed instructions (i.e. movaps,etc) assembly
+# code however stack is not aligned causing fault crashes...
+ifeq ($(CC),clang)
+ifeq ($(wildcard /etc/redhat-release),"")
+RH_RELEASE := $(shell cat /etc/redhat-release)
+ifeq ($(findstring $(RH_RELEASE)),CentOS)
+ifeq ($(findstring $(RH_RELEASE)),6.5)
+LINUXVER := $(subst ., ,$(subst -, ,$(shell uname -r)))
+LINUXREV := $(word 4,$(LINUXVER))
+ifeq ($(shell (test $(LINUXREV) -le 431 && echo 0)), 0)
+INTERNAL_OBJCFLAGS = -mno-sse
+endif
+endif
+endif
+endif
+endif
+
 CFLAGS =
+
+INTERNAL_LDFLAGS += 
 
 # If the compiler supports native ObjC exceptions and the user wants us to
 # use them, turn them on!


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to