Fix linkage with -nodefaultlibs option.
2020-09-20 John David Anglin < danglin@gcc.gnu.org> gcc/ChangeLog * config/pa/pa-hpux11.h (LINK_GCC_C_SEQUENCE_SPEC): Delete. * config/pa/pa64-hpux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise. (ENDFILE_SPEC): Link with libgcc_stub.a and mill.a. * config/pa/pa32-linux.h (ENDFILE_SPEC): Link with libgcc.a.
This commit is contained in:
parent
0968df43cd
commit
363e7755f2
@ -154,11 +154,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{!mt:%{!pthread:-a shared -lc -a archive}}}}\
|
||||
%{shared:%{mt|pthread:-lpthread}}"
|
||||
|
||||
/* The libgcc_stub.a library needs to come last. */
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%G %{!nolibc:%L} %G %{!nostdlib:%{!nodefaultlibs:%{!shared:-lgcc_stub}}}"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \
|
||||
|
@ -57,6 +57,11 @@ call_ ## FUNC (void) \
|
||||
}
|
||||
#endif
|
||||
|
||||
/* We need to link against libgcc.a for __canonicalize_funcptr_for_compare
|
||||
and $$dyncall. */
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC "libgcc.a%s"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "long int"
|
||||
|
||||
|
@ -103,12 +103,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{shared:%{mt|pthread:-lpthread}}"
|
||||
#endif
|
||||
|
||||
/* The libgcc_stub.a and milli.a libraries need to come last. */
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "\
|
||||
%G %{!nolibc:%L} %G %{!nostdlib:%{!nodefaultlibs:%{!shared:-lgcc_stub}\
|
||||
milli.a%s}}"
|
||||
|
||||
/* Under hpux11, the normal location of the `ld' and `as' programs is the
|
||||
/usr/ccs/bin directory. */
|
||||
|
||||
@ -335,8 +329,12 @@ do { \
|
||||
%{static:crtbeginT%O%s} %{!static:%{!shared:crtbegin%O%s} \
|
||||
%{shared:crtbeginS%O%s}}"
|
||||
#endif
|
||||
|
||||
/* The libgcc_stub.a and milli.a libraries must come last. We need
|
||||
to link with these libraries whenever start files are needed. */
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
|
||||
#define ENDFILE_SPEC \
|
||||
"%{!shared:crtend%O%s libgcc_stub.a%s} %{shared:crtendS%O%s} milli.a%s"
|
||||
|
||||
/* Since HP uses the .init and .fini sections for array initializers
|
||||
and finalizers, we need different defines for INIT_SECTION_ASM_OP
|
||||
|
Loading…
Reference in New Issue
Block a user