[Glibc-bsd-commits] r4416 - in trunk/glibc-ports: kfreebsd/linuxthreads patches

Petr Salinger ps-guest at alioth.debian.org
Wed May 8 09:04:49 UTC 2013


Author: ps-guest
Date: 2013-05-08 09:04:49 +0000 (Wed, 08 May 2013)
New Revision: 4416

Added:
   trunk/glibc-ports/kfreebsd/linuxthreads/pt-crti.S
   trunk/glibc-ports/patches/linuxthreads-initfini.diff
Log:
pt-initfini.c removal


Added: trunk/glibc-ports/kfreebsd/linuxthreads/pt-crti.S
===================================================================
--- trunk/glibc-ports/kfreebsd/linuxthreads/pt-crti.S	                        (rev 0)
+++ trunk/glibc-ports/kfreebsd/linuxthreads/pt-crti.S	2013-05-08 09:04:49 UTC (rev 4416)
@@ -0,0 +1,43 @@
+/* Special .init and .fini section support for libpthread.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Arrange for __pthread_initialize_minimal_internal to be called at
+   libpthread startup, instead of conditionally calling
+   __gmon_start__.  */
+
+#define PREINIT_FUNCTION __pthread_initialize_minimal_internal
+#define PREINIT_FUNCTION_WEAK 0
+
+#include <crti.S>

Added: trunk/glibc-ports/patches/linuxthreads-initfini.diff
===================================================================
--- trunk/glibc-ports/patches/linuxthreads-initfini.diff	                        (rev 0)
+++ trunk/glibc-ports/patches/linuxthreads-initfini.diff	2013-05-08 09:04:49 UTC (rev 4416)
@@ -0,0 +1,61 @@
+--- a/linuxthreads/Makefile
++++ b/linuxthreads/Makefile
+@@ -97,12 +97,11 @@
+ generated-dirs := $(firstword $(subst /, , $(multidir)))
+ crti-objs += $(multidir)/crti.o
+ crtn-objs += $(multidir)/crtn.o
+-omit-deps += $(multidir)/crti $(multidir)/crtn
++$(objpfx)$(multidir):
++	mkdir -p $@
+ endif
+ extra-objs += $(crti-objs) $(crtn-objs)
+-omit-deps += crti crtn
+-
+-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
++extra-objs += pt-crti.o
+ endif
+ 
+ librt-tests = ex10 ex11 tst-clock1
+@@ -266,33 +265,6 @@
+ endif
+ 
+ ifeq ($(build-shared),yes)
+-vpath pt-initfini.c $(sysdirs)
+-
+-$(objpfx)pt-initfini.s: pt-initfini.c
+-	$(compile.c) -S $(CFLAGS-pt-initfini.s) -finhibit-size-directive \
+-		$(patsubst -f%,-fno-%,$(exceptions)) -o $@
+-
+-# We only have one kind of startup code files.  Static binaries and
+-# shared libraries are build using the PIC version.
+-$(objpfx)crti.S: $(objpfx)pt-initfini.s
+-	sed -n -e '1,/@HEADER_ENDS/p' \
+-	       -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
+-	       -e '/@TRAILER_BEGINS/,$$p' $< > $@
+-$(objpfx)crtn.S: $(objpfx)pt-initfini.s
+-	sed -n -e '1,/@HEADER_ENDS/p' \
+-	       -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
+-	       -e '/@TRAILER_BEGINS/,$$p' $< > $@
+-
+-$(objpfx)defs.h: $(objpfx)pt-initfini.s
+-	sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
+-		$(AWK) -f ../csu/defs.awk > $@
+-
+-$(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h
+-	$(compile.S) -g0 $(ASFLAGS-.os) -o $@
+-
+-$(objpfx)crtn.o: $(objpfx)crtn.S $(objpfx)defs.h
+-	$(compile.S) -g0 $(ASFLAGS-.os) -o $@
+-
+ ifneq ($(multidir),.)
+ $(objpfx)$(multidir):
+ 	@mkdir -p $(objpfx)$(multidir)
+@@ -304,7 +275,7 @@
+ 	ln -f $< $@
+ endif
+ 
+-generated += crti.S crtn.S defs.h pt-initfini.s libpthread_nonshared.a
++generated += libpthread_nonshared.a
+ endif
+ 
+ ifeq (yes,$(build-static-nss))




More information about the Glibc-bsd-commits mailing list