Add FreeBSD options from specs to freebsd.opt

Message ID
State New
Headers show

Commit Message

Joseph Myers Dec. 16, 2010, 11:20 p.m.
In preparation for the driver only accepting options listed in .opt
files, and not other options that simply happen to match some spec,
this patch adds FreeBSD options matched by specs to freebsd.opt.
There are in essence two parts to this patch:

* The -profile and -pthread options from specs in freebsd-spec.h are
  added to freebsd.opt.

* Various linker options listed there as part of eliminating
  WORD_SWITCH_TAKES_ARG also have (in the GNU linker at least) joined
  forms with '=' which would be matched by specs such as %{assert*}
  just like the separate argument forms.  So that they continue to be
  accepted I added the joined forms to freebsd.opt.  (I put rpath=
  here rather than in rpath.opt since some targets using rpath.opt may
  not accept -rpath= in their linkers, and certainly some specs used
  for -rpath for some targets wouldn't handle -rpath= correctly.)

freebsd-spec.h is also used by lots of powerpc*-* targets as part of
supporting -mcall-freebsd.  I didn't do anything about making options
available there (but my inclination is generally not to make target
options available for -mcall-* specs; I don't really feel the -mcall-*
support is useful at present, it just makes powerpc*-* targets
gratuitously different from other targets and so more complicated to

Tested building cc1 and xgcc for cross to i686-freebsd8.  OK to

2010-12-16  Joseph Myers  <>

	* config/freebsd.opt (assert=, defsym=, profile, pthread,
	rpath-link=, rpath=, soname=): New Driver options.


Joseph Myers Dec. 24, 2010, 4:54 p.m. | #1
Ping.  This patch 
<> is pending 
Loren James Rittle Dec. 27, 2010, 10:25 p.m. | #2
OK by me. Regards, Loren

On Thu, Dec 16, 2010 at 5:20 PM, Joseph S. Myers
<> wrote:
> 2010-12-16  Joseph Myers  <>
>        * config/freebsd.opt (assert=, defsym=, profile, pthread,
>        rpath-link=, rpath=, soname=): New Driver options.


Index: gcc/config/freebsd.opt
--- gcc/config/freebsd.opt	(revision 167956)
+++ gcc/config/freebsd.opt	(working copy)
@@ -26,13 +26,34 @@ 
 Driver Separate
+Driver JoinedOrMissing
 Driver Separate
+Driver JoinedOrMissing
 Driver Separate
+Driver JoinedOrMissing
+Driver JoinedOrMissing
 Driver Separate
+Driver JoinedOrMissing
 ; This comment is to ensure we retain the blank line above.