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]

PATCH: Ignore -static on IRIX6



Since static linking doesn't work on IRIX 6 (there is no non-static
equivalent for several of the system libraries, and the IRIX linker
basically doesn't work when given the non_shared option), causes gcc
to ignore -static on IRIX 6, as per the documentation of -static in
GCC's info pages.

Tested on mips-sgi-irix6.5.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Fri Nov  3 13:41:04 2000  Mark P Mitchell  <mark@codesourcery.com>

	* config/mips/iris6.h (SUBTARGET_CC1_SPEC): Remove -static
	handling.
	(STARTFILE_SPEC): Likewise.
	(LINK_SPEC): Likewise.

Index: config/mips/iris6.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/iris6.h,v
retrieving revision 1.23
diff -c -p -r1.23 iris6.h
*** iris6.h	2000/11/02 23:29:11	1.23
--- iris6.h	2000/11/03 20:37:08
*************** Boston, MA 02111-1307, USA.  */
*** 43,49 ****
  /* This is handled in override_options.  */
  
  #undef SUBTARGET_CC1_SPEC
! #define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
  
  /* We must pass -D_LONGLONG always, even when -ansi is used, because irix6
     system header files require it.  This is OK, because gcc never warns
--- 43,49 ----
  /* This is handled in override_options.  */
  
  #undef SUBTARGET_CC1_SPEC
! #define SUBTARGET_CC1_SPEC ""
  
  /* We must pass -D_LONGLONG always, even when -ansi is used, because irix6
     system header files require it.  This is OK, because gcc never warns
*************** do {									 \
*** 480,486 ****
     on the mipsX option.  */
  #undef STARTFILE_SPEC
  #define STARTFILE_SPEC \
!   "%{!static:%{!shared: \
       %{mabi=32:%{pg:gcrt1.o%s} \
         %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
       %{mabi=n32: \
--- 480,486 ----
     on the mipsX option.  */
  #undef STARTFILE_SPEC
  #define STARTFILE_SPEC \
!   "%{!shared: \
       %{mabi=32:%{pg:gcrt1.o%s} \
         %{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \
       %{mabi=n32: \
*************** do {									 \
*** 503,542 ****
             %{!p:/usr/lib32/mips4/crt1.o%s}}} \
         %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
           %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
!            %{!p:/usr/lib32/mips3/crt1.o%s}}}}}} \
!    %{static: \
!      %{mabi=32:%{pg:/usr/lib/nonshared/gcrt1.o%s} \
!        %{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s /usr/lib/nonshared/libprof1.a%s} \
!          %{!p:/usr/lib/nonshared/crt1.o%s}}} \
!      %{mabi=n32: \
!        %{mips4:%{pg:/usr/lib32/mips4/nonshared/gcrt1.o%s} \
!          %{!pg:%{p:/usr/lib32/mips4/nonshared/mcrt1.o%s \
!              /usr/lib32/mips4/nonshared/libprof1.a%s} \
!            %{!p:/usr/lib32/mips4/nonshared/crt1.o%s}}} \
!        %{!mips4:%{pg:/usr/lib32/mips3/nonshared/gcrt1.o%s} \
!          %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
!              /usr/lib32/mips3/nonshared/libprof1.a%s} \
!            %{!p:/usr/lib32/mips3/nonshared/crt1.o%s}}}} \
!      %{mabi=64: \
!        %{mips4:%{pg:/usr/lib64/mips4/nonshared/gcrt1.o} \
!          %{!pg:%{p:/usr/lib64/mips4/nonshared/mcrt1.o \
!              /usr/lib64/mips4/nonshared/libprof1.a} \
!            %{!p:/usr/lib64/mips4/nonshared/crt1.o}}} \
!        %{!mips4:%{pg:/usr/lib64/mips3/nonshared/gcrt1.o} \
!          %{!pg:%{p:/usr/lib64/mips3/nonshared/mcrt1.o \
!              /usr/lib64/mips3/nonshared/libprof1.a} \
!            %{!p:/usr/lib64/mips3/nonshared/crt1.o}}}} \
!      %{!mabi*: \
!        %{mips4:%{pg:/usr/lib32/mips4/nonshared/gcrt1.o%s} \
!          %{!pg:%{p:/usr/lib32/mips4/nonshared/mcrt1.o%s \
!              /usr/lib32/mips4/nonshared/libprof1.a%s} \
!            %{!p:/usr/lib32/mips4/nonshared/crt1.o%s}}} \
!        %{!mips4:%{pg:/usr/lib32/mips3/nonshared/gcrt1.o%s} \
!          %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
!            /usr/lib32/mips3/nonshared/libprof1.a%s} \
!          %{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
!              /usr/lib32/mips3/nonshared/libprof1.a%s} \
!            %{!p:/usr/lib32/mips3/nonshared/crt1.o%s}}}}}} \
     crtbegin.o%s"
  
  #undef LIB_SPEC
--- 503,509 ----
             %{!p:/usr/lib32/mips4/crt1.o%s}}} \
         %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
           %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
!            %{!p:/usr/lib32/mips3/crt1.o%s}}}}} \
     crtbegin.o%s"
  
  #undef LIB_SPEC
*************** do {									 \
*** 575,583 ****
  %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
  %{bestGnum} %{shared} %{non_shared} \
  %{call_shared} %{no_archive} %{exact_version} %{w} \
! %{static: -non_shared} \
! %{!static: \
!   %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}}} \
  %{rpath} -init __do_global_ctors -fini __do_global_dtors \
  %{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__,__frame_dummy} \
  -_SYSTYPE_SVR4 -woff 131 \
--- 542,548 ----
  %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
  %{bestGnum} %{shared} %{non_shared} \
  %{call_shared} %{no_archive} %{exact_version} %{w} \
! %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \
  %{rpath} -init __do_global_ctors -fini __do_global_dtors \
  %{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__,__frame_dummy} \
  -_SYSTYPE_SVR4 -woff 131 \

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