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]

[08/25] Specs cleanup: AVR


Some targets have specs accepting a -posix option to define
_POSIX_SOURCE (the feature test macro for a very old version of POSIX,
but that's another matter), and some have specs accepting -profile to
mean profiling and linking with a profiling version of libc.

Whether these make sense depends on the target OS, not the
architecture, and whether the options are accepted should also depend
on the OS.  In particular, it seems inappropriate for AVR to have
specs to accept these options.  AVR devices are hardly going to be
hosting POSIX-conforming operating systems, and the -profile spec is
only for cc1; there's nothing to make that option affect linking, so
it's just a useless alias of other profiling options.  This patch
removes both the specs in question for AVR.  OK to commit?

2011-01-13  Joseph Myers  <joseph@codesourcery.com>

	* config/avr/avr.h (CPP_SPEC): Don't handle -posix.
	(CC1_SPEC): Don't handle -profile.

diff -rupN --exclude=.svn gcc-mainline-7/gcc/config/avr/avr.h gcc-mainline/gcc/config/avr/avr.h
--- gcc-mainline-7/gcc/config/avr/avr.h	2010-10-20 15:23:36.000000000 -0700
+++ gcc-mainline/gcc/config/avr/avr.h	2011-01-12 14:14:37.000000000 -0800
@@ -739,9 +739,9 @@ extern const char *avr_device_to_devicel
   { "device_to_startfile", avr_device_to_startfiles }, \
   { "device_to_devicelib", avr_device_to_devicelib },
 
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC ""
 
-#define CC1_SPEC "%{profile:-p}"
+#define CC1_SPEC ""
 
 #define CC1PLUS_SPEC "%{!frtti:-fno-rtti} \
     %{!fenforce-eh-specs:-fno-enforce-eh-specs} \

-- 
Joseph S. Myers
joseph@codesourcery.com


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