Преглед на файлове

Fix compilation of ld-tigcc with Apple GCC (needs -fnested-functions from XCode 2.3 on).
Add note that XCode 2.2 and 2.2.1 are not supported and will not work.


git-svn-id: file:///var/svn/tigccpp/trunk@729 9552661e-59e3-4036-b4f2-dbe53926924f

kevinkofler преди 18 години
родител
ревизия
7de5488ad2
променени са 3 файла, в които са добавени 23 реда и са изтрити 1 реда
  1. 4 1
      tigcc-linux/CHANGELOG
  2. 5 0
      tigcc-linux/README.osX
  3. 14 0
      tigcc-linux/scripts/launch.ld-tigcc

+ 4 - 1
tigcc-linux/CHANGELOG

@@ -1,6 +1,6 @@
 Changelog for TIGCC For Linux
 
-- 2006-07-16, CVS HEAD (Kevin Kofler)
+- 2006-07-28, CVS HEAD (Kevin Kofler)
         * Updated import scripts to use a separate CVS checkout.
         * Removed empty "ide" directory, KTIGCC will be distributed separately.
         * TIGCC/*nix is now in CVS too.
@@ -17,6 +17,9 @@ Changelog for TIGCC For Linux
           (now uses the new ld-tigcc --outputbin-main-only switch).
         * Fixed multiple uses of -Wa or -WA in the tigcc frontend (fixes
           pedrom-ld-tigcc build).
+        * Fixed compilation of ld-tigcc with Apple GCC (needs
+          -fnested-functions from XCode 2.3 on). Added note that XCode 2.2 and
+          2.2.1 are not supported and will not work.
 
 - 2005-10-02, version 0.96 beta 6 r1 (Kevin Kofler)
         * Synced Win32 TIGCC 0.96 Beta 6 source tree.

+ 5 - 0
tigcc-linux/README.osX

@@ -54,6 +54,11 @@ any errors in those instructions to me. Note that those are for OS X, running
 Apple's patched GCC. If you are running unpatched FSF GCC and/or other GNU
 utilities on Darwin, some steps might turn out not to be necessary.
 
+WARNING: XCode 2.2 and 2.2.1 are NOT supported, the GCC versions which come
+         with them (Apple GCC 4.0.1 builds 5247 and 5250) WILL NOT COMPILE
+         ld-tigcc. If you're using one of those versions, please upgrade to
+         XCode 2.3 (Apple GCC 4.0.1 build 5341).
+
 1. Use the full GCC-core (gcc-core ONLY, NOT full gcc with all the programming
    language frontends - TIGCC only supports C at the moment) and Binutils
    sources from a GNU mirror. Our local copy at tigcc.ticalc.org only supports

+ 14 - 0
tigcc-linux/scripts/launch.ld-tigcc

@@ -13,6 +13,20 @@ fi
 
 echo Installing TIGCC linker...
 cd ../sources/ld-tigcc
+
+# OS X requires a switch to enable nested functions. ld-tigcc doesn't actually
+# require an executable stack, but Apple's compiler is not clever enough to
+# make the distinction.
+if [ -z "$CC" ]
+then CC="gcc"
+fi
+if [ -z "$CFLAGS" ]
+then CFLAGS="-Os -s -fno-exceptions"
+fi
+if $CC -v --help 2>/dev/null | grep fnested-functions >/dev/null
+then export CFLAGS="$CFLAGS -fnested-functions"
+fi
+
 ${make} -e
 cp ld-tigcc $TIGCC/bin
 cp ar-tigcc $TIGCC/bin