rs6000.h (LINK_SPEC): Add %{shared:-bM:SRE}.
authorJason Merrill <merrill@gnu.org>
Fri, 9 Dec 1994 23:11:54 +0000 (23:11 +0000)
committerJason Merrill <merrill@gnu.org>
Fri, 9 Dec 1994 23:11:54 +0000 (23:11 +0000)
Fri Dec  9 14:52:41 1994  Jason Merrill  <jason@phydeaux.cygnus.com>

        * rs6000/rs6000.h (LINK_SPEC): Add %{shared:-bM:SRE}.
        (LINK_LIBGCC_SPECIAL_1): Use LIBGCC_SPEC instead.

From-SVN: r8638

gcc/config/rs6000/rs6000.h

index c58cf41922ccb6bde8f798ab88b95be50c983cad..5ea8f60b8c80051c9373798ede983b4e8accbe1e 100644 (file)
@@ -77,17 +77,22 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
    used by the AIX cc command.  So we use it here.
 
    -bnodelcsect undoes a poor choice of default relating to multiply-defined
-   csects.  See AIX documentation for more information about this.  */
+   csects.  See AIX documentation for more information about this.
+
+   -bM:SRE tells the linker that the output file is Shared REusable.  Note
+   that to actually build a shared library you will also need to specify an
+   export list with the -Wl,-bE option.  */
 
 #define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\
-   %{static:-bnso -bI:/lib/syscalls.exp} %{g*:-bexport:/usr/lib/libg.exp}"
+   %{static:-bnso -bI:/lib/syscalls.exp} %{g*:-bexport:/usr/lib/libg.exp}\
+   %{shared:-bM:SRE}"
 
 /* Profiled library versions are used by linking with special directories.  */
 #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
    %{p:-L/lib/profiled -L/usr/lib/profiled} %{g*:-lg} -lc"
 
 /* gcc must do the search itself to find libgcc.a, not use -l.  */
-#define LINK_LIBGCC_SPECIAL_1
+#define LIBGCC_SPEC "%{!shared:libgcc.a%s}"
 
 /* Don't turn -B into -L if the argument specifies a relative file name.  */
 #define RELATIVE_PREFIX_NOT_LINKDIR