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]

PATCH (mainline): Weaken port-specific error to warning


This change was inspired by the b-i-b merge that broke the use of ';'
in error text.  While rewriting the error text, I decided to revisit
the rationale for the port-specific error.  Bootstrapped
alpha-unknown-freebsd4.7 (wasn't possible, fixes gratuitous
gcc.dg/20021014-1.c failure) and i386-unknown-freebsd4.7 (with no
regression).  Parallel change made to other arches is untested but
identical in form.  Although there were some degrees of freedom in
what to do (e.g. removing the port-specific notice entirely comes to
mind), I committed to mainline "as obvious".

	(in gcc)
	* config/alpha/freebsd.h (LINK_SPEC): Weaken error to notice.
	* config/ia64/freebsd.h (LINK_SPEC): Likewise.
	* config/sparc/freebsd.h (LINK_SPEC): Likewise.
	* config/i386/freebsd.h (LINK_SPEC): Add clause to mirror other arches.

	(in gcc/testsuite)
	* gcc.dg/20021014-1.c: Annotate with expected notice text.

Index: gcc/config/alpha/freebsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/freebsd.h,v
retrieving revision 1.13
diff -c -r1.13 freebsd.h
*** gcc/config/alpha/freebsd.h	28 Jul 2002 13:00:22 -0000	1.13
--- gcc/config/alpha/freebsd.h	8 Feb 2003 01:01:24 -0000
***************
*** 39,45 ****
  #define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
  
  #define LINK_SPEC "%{G*} %{relax:-relax}				\
!   %{p:%e`-p' not supported; use `-pg' and gprof(1)}			\
    %{Wl,*:%*}								\
    %{assert*} %{R*} %{rpath*} %{defsym*}					\
    %{shared:-Bshareable %{h*} %{soname*}}				\
--- 39,45 ----
  #define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
  
  #define LINK_SPEC "%{G*} %{relax:-relax}				\
!   %{p:%nconsider using `-pg' instead of `-p' with gprof(1)}		\
    %{Wl,*:%*}								\
    %{assert*} %{R*} %{rpath*} %{defsym*}					\
    %{shared:-Bshareable %{h*} %{soname*}}				\
Index: gcc/config/i386/freebsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/freebsd.h,v
retrieving revision 1.33
diff -c -r1.33 freebsd.h
*** gcc/config/i386/freebsd.h	15 Nov 2002 14:57:11 -0000	1.33
--- gcc/config/i386/freebsd.h	8 Feb 2003 01:01:24 -0000
***************
*** 100,105 ****
--- 100,106 ----
  
  #undef	LINK_SPEC
  #define LINK_SPEC "\
+   %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
    %{Wl,*:%*} \
    %{v:-V} \
    %{assert*} %{R*} %{rpath*} %{defsym*} \
Index: gcc/config/ia64/freebsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/freebsd.h,v
retrieving revision 1.5
diff -c -r1.5 freebsd.h
*** gcc/config/ia64/freebsd.h	7 May 2002 21:07:22 -0000	1.5
--- gcc/config/ia64/freebsd.h	8 Feb 2003 01:01:24 -0000
***************
*** 19,26 ****
  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
  
! #define LINK_SPEC							\
!  "%{p:%e`-p' not supported; use `-pg' and gprof(1)}			\
    %{Wl,*:%*}								\
    %{assert*} %{R*} %{rpath*} %{defsym*}					\
    %{shared:-Bshareable %{h*} %{soname*}}				\
--- 19,26 ----
  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
  
! #define LINK_SPEC "							\
!   %{p:%nconsider using `-pg' instead of `-p' with gprof(1)}				\
    %{Wl,*:%*}								\
    %{assert*} %{R*} %{rpath*} %{defsym*}					\
    %{shared:-Bshareable %{h*} %{soname*}}				\
Index: gcc/config/sparc/freebsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/freebsd.h,v
retrieving revision 1.16
diff -c -r1.16 freebsd.h
*** gcc/config/sparc/freebsd.h	16 Dec 2002 18:21:58 -0000	1.16
--- gcc/config/sparc/freebsd.h	8 Feb 2003 01:01:24 -0000
***************
*** 30,36 ****
  
  #define LINK_SPEC "%(link_arch)						\
    %{!mno-relax:%{!r:-relax}}						\
!   %{p:%e`-p' not supported; use `-pg' and gprof(1)}			\
    %{Wl,*:%*}								\
    %{assert*} %{R*} %{rpath*} %{defsym*}					\
    %{shared:-Bshareable %{h*} %{soname*}}				\
--- 30,36 ----
  
  #define LINK_SPEC "%(link_arch)						\
    %{!mno-relax:%{!r:-relax}}						\
!   %{p:%nconsider using `-pg' instead of `-p' with gprof(1)}				\
    %{Wl,*:%*}								\
    %{assert*} %{R*} %{rpath*} %{defsym*}					\
    %{shared:-Bshareable %{h*} %{soname*}}				\
Index: gcc/testsuite/gcc.dg/20021014-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/20021014-1.c,v
retrieving revision 1.4
diff -c -r1.4 20021014-1.c
*** gcc/testsuite/gcc.dg/20021014-1.c	28 Oct 2002 18:10:56 -0000	1.4
--- gcc/testsuite/gcc.dg/20021014-1.c	8 Feb 2003 01:01:24 -0000
***************
*** 1,6 ****
--- 1,7 ----
  /* { dg-do run } */
  /* { dg-options "-O2 -p" } */
  /* { dg-error "profiler" "No profiler support" { target mmix-*-* } 0 } */
+ /* { dg-error "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */
  /* Support for -p on solaris2 relies on mcrt1.o which comes with the
     vendor compiler.  We cannot reiably predict the directory where the
     vendor compiler (and thus mcrt1.o) is installed so we can't


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