1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
DEB_BUILD_MAINT_OPTIONS := hardening=+all,-format optimize=-lto
DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/buildopts.mk
include /usr/share/dpkg/pkg-info.mk
gnu_type := or1k-elf
gnu_type_in_deb_name = $(subst _,-,$(gnu_type))
package = gcc-$(gnu_type_in_deb_name)
tmpdir = debian/$(package)
gcc-version-major := $(shell sed '/^ gcc-\(.*\)-source,$$/!d;s//\1/;q' debian/control)
gcc-version != dpkg-query -Wf'$${Version}' gcc-$(gcc-version-major)-source
%:
dh $@
execute_before_dh_update_autotools_config: src
tar_dir = /usr/src/gcc-$(gcc-version-major)
src:
tar -xf $(tar_dir)/gcc-*.tar.xz --transform='s|[^/]*|src|'
if grep -q '^---' $(tar_dir)/patches/git-updates.diff; then \
patch -p1 < $(tar_dir)/patches/git-updates.diff; \
fi
patch -p1 < $(tar_dir)/patches/gcc-gfdl-build.diff
override_dh_autoreconf:
dh_autoreconf autoreconf2.69 -- -f -i -v `grep -v \
configure_options += --disable-nls
override_dh_auto_configure:
install -d bld
$(filter-out --runstatedir=/run, \
$(shell dh_auto_configure -Dsrc -Bbld --no-act)) \
--target=$(gnu_type) \
--disable-shared \
--disable-multilib \
--disable-bootstrap \
--enable-languages=c \
--disable-libssp \
--libdir=\$${prefix}/lib \
--with-gcc-major-version-only \
--without-included-gettext \
--with-pkgversion='GCC $(gcc-version) Debian $(DEB_VERSION)' \
$(configure_options) \
--with-system-zlib
override_dh_auto_build:
cd bld && $(MAKE) $(addprefix -j,$(DEB_BUILD_OPTION_PARALLEL))
override_dh_auto_test:
override_dh_auto_install:
cd bld && $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp' AM_UPDATE_INFO_DIR=no
override_dh_strip:
dh_strip --exclude=.a
chmod 644 $(tmpdir)/usr/libexec/gcc/$(gnu_type)/$(gcc-version-major)/liblto_plugin.so
override_dh_makeshlibs:
dh_makeshlibs --no-scripts
override_dh_gencontrol:
dh_gencontrol -- -v${gcc-version}+$(DEB_VERSION) \
-Vgcc-version-major=$(gcc-version-major)
|