cris.h (LIB_SPEC): Use -lsyslinux, not -lsyssim.

* config/cris/cris.h (LIB_SPEC) <sim*>: Use -lsyslinux, not
	-lsyssim.  Wrap -lc -lsyssim in --start-group --end-group instead
	of doubling.
	(STARTFILE_SPEC): Add crti.o, before crtbegin.o.
 	<sim*>: Always use crt1.o, regardless of N in simN.
	<!sim>: Drop support for -pg and -p variants; always use crt0.o.
	(ENDFILE_SPEC): Add crtn.o, after crtend.o.
	(CRT_CALL_STATIC_FUNCTION): Remove.
	* config/cris/aout.h (STARTFILE_SPEC): <!melinux && sim*>: Always
	use crt1.o, regardless of N in simN.
	<!sim>: Drop support for -pg and -p variants; always use crt0.o.
	(LIB_SPEC): Do not define; default to the one in config/cris/cris.h.
	(CRIS_CPP_SUBTARGET_SPEC) <melinux && !nostdinc>: Remove special
	case isystem setting.
	(MAX_OFILE_ALIGNMENT): Correct to 32, not 16.

From-SVN: r94251
This commit is contained in:
Hans-Peter Nilsson 2005-01-26 03:20:22 +00:00 committed by Hans-Peter Nilsson
parent 6a03afdf3e
commit fe04ce064a
3 changed files with 30 additions and 64 deletions

View File

@ -1,3 +1,21 @@
2005-01-26 Hans-Peter Nilsson <hp@axis.com>
* config/cris/cris.h (LIB_SPEC) <sim*>: Use -lsyslinux, not
-lsyssim. Wrap -lc -lsyssim in --start-group --end-group instead
of doubling.
(STARTFILE_SPEC): Add crti.o, before crtbegin.o.
<sim*>: Always use crt1.o, regardless of N in simN.
<!sim>: Drop support for -pg and -p variants; always use crt0.o.
(ENDFILE_SPEC): Add crtn.o, after crtend.o.
(CRT_CALL_STATIC_FUNCTION): Remove.
* config/cris/aout.h (STARTFILE_SPEC): <!melinux && sim*>: Always
use crt1.o, regardless of N in simN.
<!sim>: Drop support for -pg and -p variants; always use crt0.o.
(LIB_SPEC): Do not define; default to the one in config/cris/cris.h.
(CRIS_CPP_SUBTARGET_SPEC) <melinux && !nostdinc>: Remove special
case isystem setting.
(MAX_OFILE_ALIGNMENT): Correct to 32, not 16.
2005-01-25 Ian Lance Taylor <ian@airs.com> 2005-01-25 Ian Lance Taylor <ian@airs.com>
* gimple-low.c (block_may_fallthru): Correct handling of * gimple-low.c (block_may_fallthru): Correct handling of

View File

@ -41,37 +41,14 @@ Boston, MA 02111-1307, USA. */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
"%{melinux:crt0.o%s}\ "%{melinux:crt0.o%s}\
%{!melinux:\ %{!melinux:%{sim*:crt1.o%s}%{!sim*:crt0.o%s}}"
%{sim2:s2crt0.o%s}\
%{!sim2:\
%{sim:scrt0.o%s}\
%{!sim:%{pg:gcrt0.o%s}\
%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}}"
/* Override cris.h define. */ /* Override cris.h define. */
#undef ENDFILE_SPEC #undef ENDFILE_SPEC
/* Which library to get. The only difference from the default is to get
libsc.a if -sim is given to the driver. Repeat -lc -lsysX
{X=sim,linux}, because libsysX needs (at least) errno from libc, and
then we want to resolve new unknowns in libc against libsysX, not
libnosys. Assume everything is in libc for -mlinux. */
#undef LIB_SPEC
#define LIB_SPEC \
"%{melinux:-lc -lsyslinux -lc -lsyslinux -lic}\
%{!melinux:\
%{sim*:-lc -lsyssim -lc -lsyssim}\
%{!sim*:%{g*:-lg}\
%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} -lbsp}\
-lnosys}"
#undef CRIS_CPP_SUBTARGET_SPEC #undef CRIS_CPP_SUBTARGET_SPEC
#define CRIS_CPP_SUBTARGET_SPEC \ #define CRIS_CPP_SUBTARGET_SPEC \
"%{melinux:-D__gnu_linux__ -D__linux__ -D__unix__ -D__elinux__ -D__uclinux__\ "%{melinux:-D__gnu_linux__ -D__linux__ -D__unix__ -D__elinux__ -D__uclinux__\
%{!nostdinc:\
%{!mbest-lib-options:%{isystem*}}\
-isystem elinux/include%s\
%{mbest-lib-options:%{isystem*}}}\
%{!ansi:%{!std=*:%{!undef:-Dlinux -Dunix -Delinux -Duclinux}}}}\ %{!ansi:%{!std=*:%{!undef:-Dlinux -Dunix -Delinux -Duclinux}}}}\
%{mbest-lib-options:\ %{mbest-lib-options:\
%{!moverride-best-lib-options:\ %{!moverride-best-lib-options:\
@ -135,8 +112,8 @@ Boston, MA 02111-1307, USA. */
/* Node: Storage Layout */ /* Node: Storage Layout */
/* We can align to 16 bits (only) with CRIS a.out. */ /* All sections but the .bss is rounded up to a 4-byte multiple size. */
#define MAX_OFILE_ALIGNMENT 16 #define MAX_OFILE_ALIGNMENT 32
/* Node: Data Output */ /* Node: Data Output */

View File

@ -210,35 +210,27 @@ extern const char *cris_elinux_stacksize_str;
%{sim2:%{!T*:-Tdata 0x4000000 -Tbss 0x8000000}}\ %{sim2:%{!T*:-Tdata 0x4000000 -Tbss 0x8000000}}\
%{!r:%{O2|O3: --gc-sections}}" %{!r:%{O2|O3: --gc-sections}}"
/* Which library to get. The only difference from the default is to get /* Which library to get. The simulator uses a different library for
libsc.a if -sim is given to the driver. Repeat -lc -lsysX the low-level syscalls (implementing the Linux syscall ABI instead
{X=sim,linux}, because libsysX needs (at least) errno from libc, and of direct-iron accesses). Default everything with the stub "nosys"
then we want to resolve new unknowns in libc against libsysX, not library. */
libnosys. */
/* Override previous definitions (linux.h). */ /* Override previous definitions (linux.h). */
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC \ #define LIB_SPEC \
"%{sim*:-lc -lsyssim -lc -lsyssim}\ "%{sim*:--start-group -lc -lsyslinux --end-group}\
%{!sim*:%{g*:-lg}\ %{!sim*:%{g*:-lg}\
%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} -lbsp}\ %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} -lbsp}\
-lnosys" -lnosys"
/* Linker startfile options; crt0 flavors. /* Linker startfile options; crt0 flavors.
We need to remove any previous definition (elfos.h). */
At the moment there are no gcrt0.o or mcrt0.o, but keep them here and
link them to crt0.o to be prepared. Use scrt0.c if running the
simulator, linear style, or s2crt0.c if fixed style. */
/* We need to remove any previous definition (elfos.h). */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
"%{sim2:s2crt0.o%s}\ "%{sim*:crt1.o%s}%{!sim*:crt0.o%s}\
%{!sim2:%{sim:scrt0.o%s}\ crti.o%s crtbegin.o%s"
%{!sim:%{pg:gcrt0.o%s}\
%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
crtbegin.o%s"
#undef ENDFILE_SPEC #undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s" #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#define EXTRA_SPECS \ #define EXTRA_SPECS \
{"cpp_subtarget", CRIS_CPP_SUBTARGET_SPEC}, \ {"cpp_subtarget", CRIS_CPP_SUBTARGET_SPEC}, \
@ -1335,27 +1327,6 @@ struct cum_args {int regs;};
/* The jump table is immediately connected to the preceding insn. */ /* The jump table is immediately connected to the preceding insn. */
#define JUMP_TABLES_IN_TEXT_SECTION 1 #define JUMP_TABLES_IN_TEXT_SECTION 1
/* We pull a little trick to register the _fini function with atexit,
after (presumably) registering the eh frame info, since we don't handle
_fini (a.k.a. ___fini_start) in crt0 or have a crti for "pure" ELF. If
you change this, don't forget that you can't have library function
references (e.g. to atexit) in crtend.o, since those won't be resolved
to libraries; those are linked in *before* crtend.o. */
#ifdef CRT_BEGIN
# define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
static void __attribute__((__used__)) \
call_ ## FUNC (void) \
{ \
asm (SECTION_OP); \
FUNC (); \
if (__builtin_strcmp (#FUNC, "frame_dummy") == 0) \
{ \
extern void __fini__start (void); \
atexit (__fini__start); \
} \
asm (TEXT_SECTION_ASM_OP); \
}
#endif
/* Node: PIC */ /* Node: PIC */