[Glibc-bsd-commits] r6048 - in trunk/freebsd-utils/debian: . patches
stevenc-guest at alioth.debian.org
stevenc-guest at alioth.debian.org
Sat May 7 16:22:57 UTC 2016
Author: stevenc-guest
Date: 2016-05-07 16:22:56 +0000 (Sat, 07 May 2016)
New Revision: 6048
Added:
trunk/freebsd-utils/debian/patches/pie.diff
Modified:
trunk/freebsd-utils/debian/changelog
trunk/freebsd-utils/debian/compat
trunk/freebsd-utils/debian/control
trunk/freebsd-utils/debian/patches/series
trunk/freebsd-utils/debian/rules
Log:
Bring in changes from freebsd-libs and refactor:
* Now using debhelper compat v9
* Now using Standards-Version 3.9.8 (no changes needed).
* Add Build-Depends: dpkg-dev (>= 1.16.1.1) and use buildflags.mk
to set CFLAGS, respecting DEB_BUILD_OPTIONS flags such as noopt
* Enable hardening=+all, which includes PIE, relro and stack protector
* Link against the PIC version of C runtime, so that PIE can be
enabled.
- pie.diff
* Use architecture.mk instead of individual calls to dpkg-architecture
* Use the proper host architecture compiler
Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog 2016-05-06 15:54:01 UTC (rev 6047)
+++ trunk/freebsd-utils/debian/changelog 2016-05-07 16:22:56 UTC (rev 6048)
@@ -1,3 +1,18 @@
+freebsd-utils (10.3~svn296373-2) UNRELEASED; urgency=medium
+
+ * Now using debhelper compat v9
+ * Now using Standards-Version 3.9.8 (no changes needed).
+ * Add Build-Depends: dpkg-dev (>= 1.16.1.1) and use buildflags.mk
+ to set CFLAGS, respecting DEB_BUILD_OPTIONS flags such as noopt
+ * Enable hardening=+all, which includes PIE, relro and stack protector
+ * Link against the PIC version of C runtime, so that PIE can be
+ enabled.
+ - pie.diff
+ * Use architecture.mk instead of individual calls to dpkg-architecture
+ * Use the proper host architecture compiler
+
+ -- Steven Chamberlain <steven at pyro.eu.org> Sat, 07 May 2016 00:30:27 +0100
+
freebsd-utils (10.3~svn296373-1) experimental; urgency=medium
* New upstream snapshot of 10.3-RC3
Modified: trunk/freebsd-utils/debian/compat
===================================================================
--- trunk/freebsd-utils/debian/compat 2016-05-06 15:54:01 UTC (rev 6047)
+++ trunk/freebsd-utils/debian/compat 2016-05-07 16:22:56 UTC (rev 6048)
@@ -1 +1 @@
-7
+9
Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control 2016-05-06 15:54:01 UTC (rev 6047)
+++ trunk/freebsd-utils/debian/control 2016-05-07 16:22:56 UTC (rev 6048)
@@ -7,7 +7,8 @@
Robert Millan <rmh at debian.org>,
Christoph Egger <christoph at debian.org>,
Steven Chamberlain <steven at pyro.eu.org>,
-Build-Depends: debhelper (>= 7), po-debconf, sharutils,
+Build-Depends: debhelper (>= 9), po-debconf, sharutils,
+ dpkg-dev (>= 1.16.1.1),
flex | flex-old,
freebsd-buildutils (>= 9.0-8~),
freebsd-mk (>= 10.0-5~),
@@ -49,7 +50,7 @@
libutil-freebsd-dev (>= 10.3~svn296373-4~),
Vcs-Browser: http://anonscm.debian.org/viewvc/glibc-bsd/trunk/freebsd-utils/
Vcs-Svn: svn://anonscm.debian.org/glibc-bsd/trunk/freebsd-utils/
-Standards-Version: 3.9.2
+Standards-Version: 3.9.8
Package: freebsd-utils
Priority: required
Added: trunk/freebsd-utils/debian/patches/pie.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/pie.diff (rev 0)
+++ trunk/freebsd-utils/debian/patches/pie.diff 2016-05-07 16:22:56 UTC (rev 6048)
@@ -0,0 +1,23 @@
+Date: Sat, 07 May 2016 17:07:27 +0100
+From: Steven Chamberlain <steven at pyro.eu.org>
+Subject: link against PIC-enabled C runtime
+
+Link against the PIC version of C runtime, so that PIE can be enabled.
+
+--- a/src/sbin/devd/Makefile
++++ b/src/sbin/devd/Makefile
+@@ -14,11 +14,11 @@
+ LDADD= -ll
+
+ LIBSTDC++ != \
+- g++ -print-file-name=crt1.o ; \
++ g++ -print-file-name=Scrt1.o ; \
+ g++ -print-file-name=crti.o ; \
+ g++ -print-file-name=crtn.o ; \
+- g++ -print-file-name=crtbegin.o ; \
+- g++ -print-file-name=crtend.o ; \
++ g++ -print-file-name=crtbeginS.o ; \
++ g++ -print-file-name=crtendS.o ; \
+ g++ -print-file-name=libstdc++.a
+
+ LDADD+= -nostdlib \
Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series 2016-05-06 15:54:01 UTC (rev 6047)
+++ trunk/freebsd-utils/debian/patches/series 2016-05-07 16:22:56 UTC (rev 6048)
@@ -41,3 +41,4 @@
sysctl.diff
abi_breaks.diff
fstype_alias.diff
+pie.diff
Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules 2016-05-06 15:54:01 UTC (rev 6047)
+++ trunk/freebsd-utils/debian/rules 2016-05-07 16:22:56 UTC (rev 6048)
@@ -7,21 +7,40 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-CFLAGS = -Wall -g -pipe -fPIC -D_GNU_SOURCE \
+full_version := $(shell dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
+tar_version := $(shell echo $(full_version) | sed -e 's/-.*//g')
+svn_revision := $(shell echo $(full_version) | sed -e 's/.*~svn\([0-9]*\)[+-].*/\1/g')
+version := $(shell echo $(full_version) | sed -e 's/[~+-].*//g')
+major := $(shell echo $(version) | sed -e 's/\..*//g')
+revision := $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')
+
+include /usr/share/dpkg/architecture.mk
+
+# Determine host architecture compiler
+ifeq ($(origin CC),default)
+CC := $(DEB_HOST_GNU_TYPE)-gcc
+endif
+ifeq ($(origin CXX),default)
+CXX := $(DEB_HOST_GNU_TYPE)-g++
+endif
+
+# Use hardening flags
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Pre-define CFLAGS, for hardening, debug and optimisation level
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+EXTRA_CFLAGS = \
+ -Wall -pipe -fPIC -D_GNU_SOURCE \
-isystem /usr/include/tirpc \
-Werror=implicit-function-declaration \
-isystem /usr/include/freebsd -I$(CURDIR)/debian/local/include -I$(CURDIR)/src/include -lbsd \
+ $(CPPFLAGS) \
$(NULL)
-CXXFLAGS = $(CFLAGS)
+CFLAGS += $(EXTRA_CFLAGS)
+CXXFLAGS += $(EXTRA_CFLAGS)
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
- CXXFLAGS += -O0
-else
- CFLAGS += -O2
- CXXFLAGS += -O2
-endif
-
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -29,13 +48,6 @@
# BSD_MAKEFLAGS += -j$(NUMJOBS)
endif
-full_version := $(shell dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
-tar_version := $(shell echo $(full_version) | sed -e 's/-.*//g')
-svn_revision := $(shell echo $(full_version) | sed -e 's/.*~svn\([0-9]*\)[+-].*/\1/g')
-version := $(shell echo $(full_version) | sed -e 's/[~+-].*//g')
-major := $(shell echo $(version) | sed -e 's/\..*//g')
-revision := $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')
-
SVN_BASE := https://svn.freebsd.org/base
#SVN := $(SVN_BASE)/release/$(version).0
SVN := $(SVN_BASE)/releng/$(version)
@@ -49,23 +61,30 @@
PATH := /usr/lib/freebsd:$(PATH)
DESTDIR = $(CURDIR)/debian/tmp
+PMAKE_COMMON = \
+ MAKEFLAGS=$(BSD_MAKEFLAGS) \
+ NO_WERROR=1 NOGCCERROR=1 \
+ NOSHARED=NO NO_SHARED=NO \
+ make -C src $(PMAKE_FLAGS) \
+ CC=$(CC) \
+ CXX=$(CXX) \
+ $(NULL)
PMAKE = \
- MAKEFLAGS=$(BSD_MAKEFLAGS) \
- MAKEOBJDIRPREFIX=$(CURDIR)/obj-deb \
CFLAGS="$(CFLAGS)" \
- NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO NO_SHARED=NO WITHOUT_TESTS=yes \
+ CXXFLAGS="$(CXXFLAGS)" \
DESTDIR="$(DESTDIR)" \
- make -C src $(PMAKE_FLAGS)
+ MAKEOBJDIRPREFIX=$(CURDIR)/obj-deb \
+ WITHOUT_TESTS=yes \
+ $(PMAKE_COMMON)
PMAKE_UDEB = \
- MAKEFLAGS=$(BSD_MAKEFLAGS) \
- MAKEOBJDIRPREFIX=$(CURDIR)/obj-udeb \
CFLAGS="$(CFLAGS) -Os" \
- NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO NO_SHARED=NO \
+ CXXFLAGS="$(CXXFLAGS) -Os" \
DESTDIR="$(DESTDIR)-udeb" \
- make -C src $(PMAKE_FLAGS) \
+ MAKEOBJDIRPREFIX=$(CURDIR)/obj-udeb \
+ $(PMAKE_COMMON) \
-DRESCUE=yes \
+ -DWITHOUT_IPX_SUPPORT \
-DWITHOUT_JAIL \
- -DWITHOUT_IPX_SUPPORT \
$(NULL)
# for ppp
More information about the Glibc-bsd-commits
mailing list