aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-03-29 07:00:51 +0000
committerNathan Sidwell <nathan@codesourcery.com>2006-03-29 07:00:51 +0000
commit2405ad6c8fb9d22a2860a657f7ce6284b378a13e (patch)
tree467367a5dd721dc9e1145a7901839a843cf2cc8c
parent2eedd2e9b4d1f4599ec7383ca63578f6de26c53f (diff)
* gcc/gcc.c (do_spec_1): <case '*'> Don't append space here.
(process_marked_switches): Put a space between each marked switch. (process_brace_body): Put a space between each live switch. (give_switch): Don't append space here. * gcc/config/m68k/m68kemb.h (LIB_SPEC): Add BSP lib and linker script here. Group with LIBGCC spec. * gcc/config/m68k/m68k.opt (mboard, mbsp): New switches. * gcc/config/m68k/m68020-elf.h (LIB_SPEC): Do not define here. * gcc/doc/invoke.texi (M680x0 Options): Document new switches. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/coldfire-4_1@112486 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.csl12
-rw-r--r--gcc/config/m68k/m68020-elf.h2
-rw-r--r--gcc/config/m68k/m68k.opt8
-rw-r--r--gcc/config/m68k/m68kemb.h2
-rw-r--r--gcc/doc/invoke.texi15
-rw-r--r--gcc/gcc.c10
6 files changed, 43 insertions, 6 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 56510f873e3..7f60dab9283 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,15 @@
+2006-03-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gcc/gcc.c (do_spec_1): <case '*'> Don't append space here.
+ (process_marked_switches): Put a space between each marked switch.
+ (process_brace_body): Put a space between each live switch.
+ (give_switch): Don't append space here.
+ * gcc/config/m68k/m68kemb.h (LIB_SPEC): Add BSP lib and linker
+ script here. Group with LIBGCC spec.
+ * gcc/config/m68k/m68k.opt (mboard, mbsp): New switches.
+ * gcc/config/m68k/m68020-elf.h (LIB_SPEC): Do not define here.
+ * gcc/doc/invoke.texi (M680x0 Options): Document new switches.
+
2006-03-28 Richard Sandiford <richard@codesourcery.com>
Merge from csl/sourcerygxx-4_1 branch:
diff --git a/gcc/config/m68k/m68020-elf.h b/gcc/config/m68k/m68020-elf.h
index 9dfcdc61cfb..7cd44eb9d61 100644
--- a/gcc/config/m68k/m68020-elf.h
+++ b/gcc/config/m68k/m68020-elf.h
@@ -28,6 +28,4 @@ Boston, MA 02110-1301, USA. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crtbegin.o%s"
-#define LIB_SPEC "-lc"
-
/* end of m68020-elf.h */
diff --git a/gcc/config/m68k/m68k.opt b/gcc/config/m68k/m68k.opt
index 0ef2eb51480..67103ebbd70 100644
--- a/gcc/config/m68k/m68k.opt
+++ b/gcc/config/m68k/m68k.opt
@@ -168,6 +168,14 @@ mtune=
Target RejectNegative Joined
Tune for the specified target CPU or architecture
+mboard=
+Target RejectNegative Joined
+Specify target board
+
+mbsp=
+Target RejectNegative Joined
+Specify the BSP
+
mdiv
Target Report Var(m68k_flag_hwdiv) Init(-1)
Use hardware division instructions on ColdFire
diff --git a/gcc/config/m68k/m68kemb.h b/gcc/config/m68k/m68kemb.h
index 9804e2a2225..12a8af9ede5 100644
--- a/gcc/config/m68k/m68kemb.h
+++ b/gcc/config/m68k/m68kemb.h
@@ -46,7 +46,7 @@
profiling, or libg.a. */
#undef LIB_SPEC
-#define LIB_SPEC "-lc"
+#define LIB_SPEC "--start-group -lc %{mbsp=*:-l%*} --end-group %{mboard=*:-T%*%{mbsp=*:-%*}.ld}"
/* Make this be null, since we want the crt0.o to come from the linker
script */
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f44290480a5..8db27c9ba5d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -575,7 +575,8 @@ Objective-C and Objective-C++ Dialects}.
-mshort -mno-short -mnoshort @gol
-mstrict-align -mno-strict-align -malign-int -mno-align-int @gol
-mrtd -mno-rtd -mnortd -mpcrel -mno-pcrel -msep-data -mno-sep-data @gol
--mid-shared-library -mno-id-shared-library -mshared-library-id=@var{n}}
+-mid-shared-library -mno-id-shared-library -mshared-library-id=@var{n}} @gol
+-mboard=@var{board} -mbsp=@var{bsp}
@emph{M68hc1x Options}
@gccoptlist{-m6811 -m6812 -m68hc11 -m68hc12 -m68hcs12 @gol
@@ -10103,6 +10104,18 @@ compiled. Specifying a value of 0 will generate more compact code, specifying
other values will force the allocation of that number to the current
library but is no more space or time efficient than omitting this option.
+@item -mboard=@var{board}
+@itemx -mbsp=@var{bsp}
+@opindex mboard
+@opindex mbsp
+These two options are used when you are targetting a bare board. The
+first, @option{-mboard=}, option specifies the type of the target board, and
+is used to select the linker script to define the correct memory map.
+The second, @option{-mbsp=}, option specifies the board support
+package you wish to use for that board. This controls both the
+runtime library used by the C library and augments the linker script
+appropriately.
+
@end table
@node M68hc1x Options
diff --git a/gcc/gcc.c b/gcc/gcc.c
index b3b781a6ee5..473974784be 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -5174,7 +5174,6 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
if (soft_matched_part)
{
do_spec_1 (soft_matched_part, 1, NULL);
- do_spec_1 (" ", 0, NULL);
}
else
/* Catch the case where a spec string contains something like
@@ -5524,12 +5523,16 @@ static inline void
process_marked_switches (void)
{
int i;
+ int first = 1;
for (i = 0; i < n_switches; i++)
if (switches[i].ordering == 1)
{
+ if (!first)
+ do_spec_1 (" ", 0, NULL);
switches[i].ordering = 0;
give_switch (i, 0);
+ first = 0;
}
}
@@ -5747,17 +5750,21 @@ process_brace_body (const char *p, const char *atom, const char *end_atom,
variant part of the switch. */
unsigned int hard_match_len = end_atom - atom;
int i;
+ int first = 1;
for (i = 0; i < n_switches; i++)
if (!strncmp (switches[i].part1, atom, hard_match_len)
&& check_live_switch (i, hard_match_len))
{
+ if (!first)
+ do_spec_1 (" ", 0, NULL);
if (do_spec_1 (string, 0,
&switches[i].part1[hard_match_len]) < 0)
return 0;
/* Pass any arguments this switch has. */
give_switch (i, 1);
suffix_subst = NULL;
+ first = 0;
}
}
}
@@ -5892,7 +5899,6 @@ give_switch (int switchnum, int omit_first_word)
}
}
- do_spec_1 (" ", 0, NULL);
switches[switchnum].validated = 1;
}