diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-05-31 17:04:46 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-05-31 17:04:46 -0700 |
commit | b877b5ab3e1c240643e9d700a9aecb78fbeadf58 (patch) | |
tree | f8ad649d371d94bb4d73a23a7cd610d3eb859d81 | |
parent | 6ba295268bb4d0e7f1f57970dff824178b1c07be (diff) | |
download | gcc-b877b5ab3e1c240643e9d700a9aecb78fbeadf58.zip gcc-b877b5ab3e1c240643e9d700a9aecb78fbeadf58.tar.gz gcc-b877b5ab3e1c240643e9d700a9aecb78fbeadf58.tar.bz2 |
(ASM_SPEC): Don't pass -k when -pg or -p given.
(OVERRIDE_OPTIONS): Warn when disabling -fpic.
From-SVN: r7405
-rw-r--r-- | gcc/config/sparc/sparc.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 81ace20..14300cf 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -30,7 +30,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Special flags to the Sun-4 assembler when using pipe for input. */ -#define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k}" +#define ASM_SPEC " %| %{!pg:%{!p:%{fpic:-k} %{fPIC:-k}}}" /* Define macros to distinguish architectures. */ #define CPP_SPEC "%{msparclite:-D__sparclite__} %{mf930:-D__sparclite__} \ @@ -56,11 +56,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ the frame pointer (because the return address will get smashed). */ #define OVERRIDE_OPTIONS \ -{ \ - if (profile_flag || profile_block_flag) \ - flag_omit_frame_pointer = 0, flag_pic = 0; \ - SUBTARGET_OVERRIDE_OPTIONS \ - } +{ \ + if (profile_flag || profile_block_flag) \ + { \ + if (flag_pic) \ + { \ + char *pic_string = (flag_pic == 1) ? "-fpic" : "-fPIC"; \ + warning ("%s and profiling conflict: disabling %s", pic_string,\ + pic_string); \ + flag_pic = 0; \ + } \ + flag_omit_frame_pointer = 0; \ + } \ + SUBTARGET_OVERRIDE_OPTIONS \ +} /* This is meant to be redefined in the host dependent files */ #define SUBTARGET_OVERRIDE_OPTIONS |