Adjusted compilation optimisation flags to tune per target processor. Multi-architect...
authorIan Silvester <iansilvester@fastmail.fm>
Sat, 31 Dec 2016 17:30:57 +0000 (17:30 +0000)
committerIan Silvester <iansilvester@fastmail.fm>
Sat, 31 Dec 2016 17:30:57 +0000 (17:30 +0000)
common.sh

index 6542bf4..74dcfdc 100755 (executable)
--- a/common.sh
+++ b/common.sh
@@ -55,6 +55,7 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.7"
     ARCH="-arch x86_64"
     STARTUP="LaunchDaemon"
+    CFLAGS="-mtune=x86_64 ${CFLAGS}"
     ;;
   # Mac OS X 10.6 x86_64
   "snowleopardx64")
@@ -64,6 +65,7 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.6"
     ARCH="-arch x86_64"
     STARTUP="LaunchDaemon"
+    CFLAGS="-mtune=x86_64 ${CFLAGS}"
     ;;
   # Mac OS X 10.6 all supported architectures
   "snowleopard")
@@ -73,7 +75,6 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.6"
     ARCH="-arch x86_64 -arch i386"
     STARTUP="LaunchDaemon"
-    CFLAGS="-mtune=G5 ${CFLAGS}"
     ;;
   # Mac OS X 10.6 i386
   "snowleopardi386")
@@ -83,6 +84,7 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.6"
     ARCH="-arch i386"
     STARTUP="LaunchDaemon"
+    CFLAGS="-mtune=i386 ${CFLAGS}"
     ;;
   # Mac OS X 10.5 and all later releases
   "leopardupwards")
@@ -92,7 +94,6 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.5"
     ARCH="-arch x86_64 -arch i386 -arch ppc"
     STARTUP="LaunchDaemon"
-    CFLAGS="-mtune=G5 ${CFLAGS}"
     ;;
   # Mac OS X 10.5 all supported architectures
   "leopard")
@@ -102,7 +103,6 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.5"
     ARCH="-arch i386 -arch ppc"
     STARTUP="LaunchDaemon"
-    CFLAGS="-mtune=G5 ${CFLAGS}"
     ;;
   # Mac OS X 10.5 i386
   "leopardi386")
@@ -112,6 +112,7 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.5"
     ARCH="-arch i386"
     STARTUP="LaunchDaemon"
+    CFLAGS="-mtune=i386 ${CFLAGS}"
     ;;
   # Mac OS X 10.5 PPC
   "leopardppc")
@@ -131,7 +132,6 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.4"
     ARCH="-arch i386 -arch ppc"
     STARTUP="LaunchDaemon"
-    CFLAGS="-mtune=G5 ${CFLAGS}"
     ;;
   # Mac OS X 10.4 i386
   "tigeri386")
@@ -141,6 +141,7 @@ case "${release_name}" in
     MACOSX_VERSION="-mmacosx-version-min=10.4"
     ARCH="-arch i386"
     STARTUP="LaunchDaemon"
+    CFLAGS="-mtune=i386 ${CFLAGS}"
     ;;
   # Mac OS X 10.4 PPC
   "tigerppc")