public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Avoid bad ASM_SPEC specs for SPARC VxWorks and FreeBSD
@ 2011-02-05  0:42 Joseph S. Myers
  2011-02-05  8:33 ` Eric Botcazou
  2011-02-07  7:15 ` Nathan Sidwell
  0 siblings, 2 replies; 3+ messages in thread
From: Joseph S. Myers @ 2011-02-05  0:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: rth, davem, jakub, ebotcazou, Nathan Sidwell, ljrittle

I previously proposed removal of various options from ASM_SPEC
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00891.html>
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00913.html>
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00914.html>, which was
approved except for sparc/sysv4.h.

This left specs in sparc/sysv4.h that accepted the -Ym, option, which
is not actually a valid assembler option for the GNU assembler
(although it is for the Solaris system assembler).  This definition of
ASM_SPEC turns out to be used only for FreeBSD and VxWorks, where
non-GNU assemblers are irrelevant.  Thus, this patch adds definitions
of ASM_SPEC without the irrelevant options for those targets.
(Consequently, the definition of ASM_SPEC in sparc/sysv4.h is unused
after this patch, but as per
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00935.html> is not
removed.)

Tested building cc1 and xgcc for crosses to sparc-wrs-vxworks and
sparc64-freebsd8.  OK to commit?

2011-02-04  Joseph Myers  <joseph@codesourcery.com>

	* config/sparc/freebsd.h (ASM_SPEC): Define.
	* config/sparc/vxworks.h (ASM_SPEC): Define.

Index: gcc/config/sparc/freebsd.h
===================================================================
--- gcc/config/sparc/freebsd.h	(revision 169841)
+++ gcc/config/sparc/freebsd.h	(working copy)
@@ -1,5 +1,5 @@
 /* Definitions for Sun SPARC64 running FreeBSD using the ELF format
-   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2010
+   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
 
@@ -30,6 +30,9 @@ along with GCC; see the file COPYING3.  
 #define CPP_CPU64_DEFAULT_SPEC \
   "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
 
+#undef ASM_SPEC
+#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
+
 #define LINK_SPEC "%(link_arch)						\
   %{!mno-relax:%{!r:-relax}}						\
   %{p:%nconsider using '-pg' instead of '-p' with gprof(1)}		\
Index: gcc/config/sparc/vxworks.h
===================================================================
--- gcc/config/sparc/vxworks.h	(revision 169841)
+++ gcc/config/sparc/vxworks.h	(working copy)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler,
    for SPARC targeting the VxWorks run time environment.
-   Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -33,6 +33,9 @@ along with GCC; see the file COPYING3.  
 #undef CPP_SUBTARGET_SPEC
 #define CPP_SUBTARGET_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
 
+#undef ASM_SPEC
+#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
+
 #undef LIB_SPEC
 #define LIB_SPEC VXWORKS_LIB_SPEC
 #undef LINK_SPEC

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Avoid bad ASM_SPEC specs for SPARC VxWorks and FreeBSD
  2011-02-05  0:42 Avoid bad ASM_SPEC specs for SPARC VxWorks and FreeBSD Joseph S. Myers
@ 2011-02-05  8:33 ` Eric Botcazou
  2011-02-07  7:15 ` Nathan Sidwell
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Botcazou @ 2011-02-05  8:33 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, rth, davem, jakub, Nathan Sidwell, ljrittle

> Tested building cc1 and xgcc for crosses to sparc-wrs-vxworks and
> sparc64-freebsd8.  OK to commit?
>
> 2011-02-04  Joseph Myers  <joseph@codesourcery.com>
>
> 	* config/sparc/freebsd.h (ASM_SPEC): Define.
> 	* config/sparc/vxworks.h (ASM_SPEC): Define.

OK, thanks.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Avoid bad ASM_SPEC specs for SPARC VxWorks and FreeBSD
  2011-02-05  0:42 Avoid bad ASM_SPEC specs for SPARC VxWorks and FreeBSD Joseph S. Myers
  2011-02-05  8:33 ` Eric Botcazou
@ 2011-02-07  7:15 ` Nathan Sidwell
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Sidwell @ 2011-02-07  7:15 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches, rth, davem, jakub, ebotcazou, ljrittle

On 02/05/11 00:41, Joseph S. Myers wrote:

> Tested building cc1 and xgcc for crosses to sparc-wrs-vxworks and
> sparc64-freebsd8.  OK to commit?
>
> 2011-02-04  Joseph Myers<joseph@codesourcery.com>
>
> 	* config/sparc/freebsd.h (ASM_SPEC): Define.
> 	* config/sparc/vxworks.h (ASM_SPEC): Define.

vxworks ok.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-07  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-05  0:42 Avoid bad ASM_SPEC specs for SPARC VxWorks and FreeBSD Joseph S. Myers
2011-02-05  8:33 ` Eric Botcazou
2011-02-07  7:15 ` Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).