Commit 90488014 by John David Anglin Committed by John David Anglin

config.gcc (hppa[12]*-*-hpux11*): Don't set extra_parts.

	* config.gcc (hppa[12]*-*-hpux11*): Don't set extra_parts.
	* config/pa/stublib.c (pthread_default_stacksize_np, pthread_mutex_lock,
	pthread_mutex_unlock): Remove.
	* config/pa/t-pa-hpux11: Remove rules to build pthread stubs.
	* config/pa/t-pa64: Likewise.
	* config/pa/pa64-hpux.h (LIB_SPEC): In static links, link against
	shared libc if not linking against libpthread.
	* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.

From-SVN: r169906
parent 689ff841
2011-02-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config.gcc (hppa[12]*-*-hpux11*): Don't set extra_parts.
* config/pa/stublib.c (pthread_default_stacksize_np, pthread_mutex_lock,
pthread_mutex_unlock): Remove.
* config/pa/t-pa-hpux11: Remove rules to build pthread stubs.
* config/pa/t-pa64: Likewise.
* config/pa/pa64-hpux.h (LIB_SPEC): In static links, link against
shared libc if not linking against libpthread.
* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
2011-02-07 Iain Sandoe <iains@gcc.gnu.org> 2011-02-07 Iain Sandoe <iains@gcc.gnu.org>
PR target/47558 PR target/47558
......
...@@ -1140,7 +1140,6 @@ hppa[12]*-*-hpux11*) ...@@ -1140,7 +1140,6 @@ hppa[12]*-*-hpux11*)
else else
tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver" tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
fi fi
extra_parts="libgcc_stub.a"
case x${enable_threads} in case x${enable_threads} in
x | xyes | xposix ) x | xyes | xposix )
thread_file=posix thread_file=posix
......
...@@ -114,23 +114,19 @@ along with GCC; see the file COPYING3. If not see ...@@ -114,23 +114,19 @@ along with GCC; see the file COPYING3. If not see
-z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\ -z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
%{static:-a archive} %{shared:-b}" %{static:-a archive} %{shared:-b}"
/* HP-UX 11 has posix threads. HP libc contains pthread stubs so that /* HP-UX 11 has posix threads. HP's shared libc contains pthread stubs
non-threaded applications can be linked with a thread-safe libc so that non-threaded applications can be linked with a thread-safe
without a subsequent loss of performance. For more details, see libc without a subsequent loss of performance. For more details,
<http://docs.hp.com/en/1896/pthreads.html>. */ see <http://docs.hp.com/en/1896/pthreads.html>. */
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC \ #define LIB_SPEC \
"%{!shared:\ "%{!shared:\
%{fopenmp:%{static:-a archive_shared} -lrt %{static:-a archive}}\ %{fopenmp:%{static:-a archive_shared} -lrt %{static:-a archive}}\
%{mt|pthread:-lpthread} -lc\ %{mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a archive_shared -ldld -a archive -lc}}}\ %{static:%{!nolibdld:-a archive_shared -ldld -a archive -lc}\
%{!mt:%{!pthread:-a shared -lc -a archive}}}}\
%{shared:%{mt|pthread:-lpthread}}" %{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 %L %G %{!nostdlib:%{!nodefaultlibs:%{!shared:-lgcc_stub}}}"
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \ "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \
......
...@@ -61,34 +61,40 @@ along with GCC; see the file COPYING3. If not see ...@@ -61,34 +61,40 @@ along with GCC; see the file COPYING3. If not see
"%{!shared:\ "%{!shared:\
%{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\ %{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
%{mt|pthread:-lpthread} -lc\ %{mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
%{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\ %{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
-lprof %{static:-a archive}\ -lprof %{static:-a archive}\
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\ %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
%{mt|pthread:-lpthread} -lc\ %{mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
%{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\ %{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
-lgprof %{static:-a archive}\ -lgprof %{static:-a archive}\
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\ %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
%{mt|pthread:-lpthread} -lc\ %{mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
%{shared:%{mt|pthread:-lpthread}}" %{shared:%{mt|pthread:-lpthread}}"
#else #else
#define LIB_SPEC \ #define LIB_SPEC \
"%{!shared:\ "%{!shared:\
%{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\ %{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
%{mt|pthread:-lpthread} -lc\ %{mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
%{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\ %{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
-lprof %{static:-a archive}\ -lprof %{static:-a archive}\
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\ %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
%{mt|pthread:-lpthread} -lc\ %{mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
%{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\ %{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
-lgprof %{static:-a archive}\ -lgprof %{static:-a archive}\
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\ %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
%{mt|pthread:-lpthread} -lc\ %{mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
%{shared:%{mt|pthread:-lpthread}}" %{shared:%{mt|pthread:-lpthread}}"
#endif #endif
......
...@@ -56,33 +56,3 @@ _Jv_RegisterClasses (void *p) ...@@ -56,33 +56,3 @@ _Jv_RegisterClasses (void *p)
{ {
} }
#endif #endif
#ifdef L_pthread_default_stacksize_np
int pthread_default_stacksize_np (unsigned long __attribute__((unused)),
unsigned long *);
int
pthread_default_stacksize_np (unsigned long new, unsigned long *old)
{
if (old)
*old = 0;
return 0;
}
#endif
#ifdef L_pthread_mutex_lock
int pthread_mutex_lock (void * __attribute__((unused)));
int
pthread_mutex_lock (void *p)
{
return 0;
}
#endif
#ifdef L_pthread_mutex_unlock
int pthread_mutex_unlock (void * __attribute__((unused)));
int
pthread_mutex_unlock (void *p)
{
return 0;
}
#endif
TARGET_LIBGCC2_CFLAGS = -fPIC -frandom-seed=fixed-seed TARGET_LIBGCC2_CFLAGS = -fPIC -frandom-seed=fixed-seed
LIB2FUNCS_EXTRA=lib2funcs.asm quadlib.c LIB2FUNCS_EXTRA=lib2funcs.asm quadlib.c
LIBGCCSTUB_OBJS = pthread_default_stacksize_np-stub.o \
pthread_mutex_lock-stub.o \
pthread_mutex_unlock-stub.o
stublib.c: $(srcdir)/config/pa/stublib.c
rm -f stublib.c
cp $(srcdir)/config/pa/stublib.c .
pthread_default_stacksize_np-stub.o: stublib.c $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -O2 -DL_pthread_default_stacksize_np stublib.c \
-o pthread_default_stacksize_np-stub.o
pthread_mutex_lock-stub.o: stublib.c $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_lock stublib.c \
-o pthread_mutex_lock-stub.o
pthread_mutex_unlock-stub.o: stublib.c $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_unlock stublib.c \
-o pthread_mutex_unlock-stub.o
$(T)libgcc_stub.a: $(LIBGCCSTUB_OBJS)
-rm -rf $(T)libgcc_stub.a
$(AR) rc $(T)libgcc_stub.a $(LIBGCCSTUB_OBJS)
$(RANLIB) $(T)libgcc_stub.a
...@@ -19,10 +19,7 @@ ...@@ -19,10 +19,7 @@
TARGET_LIBGCC2_CFLAGS = -fPIC -Dpa64=1 -DELF=1 -mlong-calls TARGET_LIBGCC2_CFLAGS = -fPIC -Dpa64=1 -DELF=1 -mlong-calls
LIB2FUNCS_EXTRA = quadlib.c LIB2FUNCS_EXTRA = quadlib.c
LIBGCCSTUB_OBJS = rfi-stub.o dfi-stub.o jvrc-stub.o cxaf-stub.o \ LIBGCCSTUB_OBJS = rfi-stub.o dfi-stub.o jvrc-stub.o cxaf-stub.o
pthread_default_stacksize_np-stub.o \
pthread_mutex_lock-stub.o \
pthread_mutex_unlock-stub.o
stublib.c: $(srcdir)/config/pa/stublib.c stublib.c: $(srcdir)/config/pa/stublib.c
rm -f stublib.c rm -f stublib.c
...@@ -44,18 +41,6 @@ jvrc-stub.o: stublib.c $(GCC_PASSES) ...@@ -44,18 +41,6 @@ jvrc-stub.o: stublib.c $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -O2 -DL_Jv_RegisterClasses stublib.c \ $(GCC_FOR_TARGET) -c -O2 -DL_Jv_RegisterClasses stublib.c \
-o jvrc-stub.o -o jvrc-stub.o
pthread_default_stacksize_np-stub.o: stublib.c $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -O2 -DL_pthread_default_stacksize_np stublib.c \
-o pthread_default_stacksize_np-stub.o
pthread_mutex_lock-stub.o: stublib.c $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_lock stublib.c \
-o pthread_mutex_lock-stub.o
pthread_mutex_unlock-stub.o: stublib.c $(GCC_PASSES)
$(GCC_FOR_TARGET) -c -O2 -DL_pthread_mutex_unlock stublib.c \
-o pthread_mutex_unlock-stub.o
$(T)libgcc_stub.a: $(LIBGCCSTUB_OBJS) $(T)libgcc_stub.a: $(LIBGCCSTUB_OBJS)
-rm -rf $(T)libgcc_stub.a -rm -rf $(T)libgcc_stub.a
$(AR) rc $(T)libgcc_stub.a $(LIBGCCSTUB_OBJS) $(AR) rc $(T)libgcc_stub.a $(LIBGCCSTUB_OBJS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment