This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Pass -mmacosx-version-min to ld on Darwin


The very latest version of the linker now takes the
-macosx_version_min option, so now it should be passed down from the
compiler.  This ensures that both the compiler and the linker are
building to target the same version of the OS.

On less-than-latest versions of the linker, this will cause use of the
flag to fail when linking.  I consider this a feature, because the
alternative is that linking silently succeeds but doesn't build for
the deployment target that you were expecting!

(And therefore, until I can put up newer versions of cctools, you
should just ignore those regression test failures.  Sorry!  But at
least they prove that the flag works.)

Bootstrapped, tested, and 'make info' on powerpc-darwin8.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-darwin-minversionld.patch=============
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.9851
diff -u -p -u -p -r2.9851 ChangeLog
--- ChangeLog	30 Aug 2005 07:32:15 -0000	2.9851
+++ ChangeLog	31 Aug 2005 21:36:55 -0000
@@ -1,3 +1,10 @@
+2005-08-31  Geoffrey Keating  <geoffk@apple.com>
+
+	* doc/install.texi (Specific): Update cctools version required
+	for full functionality.
+	* config/darwin.h (LINK_SPEC): Pass -mmacosx-version-min to the
+	linkers as -macosx_version_min.
+
 2005-08-29  Geoffrey Keating  <geoffk@apple.com>
 
 	* config/i386/i386.c (ix86_expand_vector_init_one_var): Don't modify
Index: config/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.h,v
retrieving revision 1.127
diff -u -p -u -p -r1.127 darwin.h
--- config/darwin.h	24 Aug 2005 18:22:11 -0000	1.127
+++ config/darwin.h	31 Aug 2005 21:36:55 -0000
@@ -268,6 +268,7 @@ Boston, MA 02110-1301, USA.  */
    %{headerpad_max_install_names*} \
    %{Zimage_base*:-image_base %*} \
    %{Zinit*:-init %*} \
+   %{mmacosx-version-min=*:-macosx_version_min %*} \
    %{nomultidefs} \
    %{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
    %{Zmultiply_defined*:-multiply_defined %*} \
Index: doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.370
diff -u -p -u -p -r1.370 install.texi
--- doc/install.texi	6 Aug 2005 13:26:28 -0000	1.370
+++ doc/install.texi	31 Aug 2005 21:36:55 -0000
@@ -3472,7 +3472,7 @@ binaries are available at
 @uref{http://developer.apple.com/darwin/projects/compiler/} (free
 registration required).
 
-This version of GCC requires at least cctools-528.
+This version of GCC requires at least cctools-590.7.
 
 The version of GCC shipped by Apple typically includes a number of
 extensions not available in a standard GCC release.  These extensions
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]