/usr/src/gcc-4.4/debian/rules.patch is in gcc-4.4-source 4.4.7-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | # -*- makefile -*-
# rules to patch the unpacked files in the source directory
# ---------------------------------------------------------------------------
# various rules to unpack addons and (un)apply patches.
# - patch / apply-patches
# - unpatch / reverse-patches
.NOTPARALLEL:
patchdir ?= debian/patches
series_file ?= $(patchdir)/series
# which patches should be applied?
# svn-updates \
debian_patches = \
$(if $(with_linaro_branch),gcc-linaro) \
ifeq ($(with_java),yes)
# debian_patches += \
# svn-class-updates
endif
ifneq ($(GFDL_INVARIANT_FREE),yes)
debian_patches += \
rename-info-files \
pr25509-doc \
$(if $(with_linaro_branch),gcc-linaro-doc) \
texinfo-fixes \
# $(if $(with_linaro_branch),,svn-doc-updates) \
endif
# boehm-gc-nocheck: seems to work on the buildds \
debian_patches += \
gcc-textdomain \
gcc-driver-extra-langs
ifeq ($(distribution),Ubuntu)
ifneq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid))
debian_patches += gcc-hash-style-both
else
debian_patches += gcc-hash-style-gnu
endif
ifeq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid maverick))
debian-patches += gcc-no-add-needed
endif
else
debian_patches += gcc-hash-style-both
ifeq (,$(filter $(distrelease),etch lenny squeeze))
debian_patches += gcc-no-add-needed
endif
endif
debian_patches += \
$(if $(with_linaro_branch),,gcc-build-id) \
libstdc++-pic \
libstdc++-doclink \
libstdc++-man-3cxx \
libjava-stacktrace \
libjava-subdir \
libjava-jnipath \
libjava-sjlj \
libjava-disable-plugin \
alpha-no-ev4-directive \
boehm-gc-getnprocs \
note-gnu-stack \
pr25509 \
pr38333 \
gcc-cloog-dl \
libgomp-omp_h-multilib \
sparc-force-cpu \
gcc-stack_chk_fail-check \
sh4_atomic_update \
libstdc++-arm-wno-abi \
gold-and-ld \
libstdc++-test-installed \
pr40816 \
gnat-snapshot-build-fix \
gcc-java-align-data \
linux-atomic-builtin-expect \
mips-fix-loongson2f-nop$(if $(with_linaro_branch),-linaro) \
gcc-system-root \
no_fpr_in_libgcc \
pr44364 \
gcc-lfs \
pr50090 \
arm-dynamic-linker \
linux-3.8-compat \
ifneq ($(with_linaro_branch),yes)
debian_patches += \
libjava-atomic-builtins-eabi \
pr39429 \
rev146451 \
gcc-unwind-debug-hook \
pr40521-revert-workaround \
pr41848 \
gcc-arm-thumb2-sched \
arm-boehm-gc-locks \
gcj-use-atomic-builtins \
sh4-scheduling \
pr42748 \
pr43323 \
pr42321 \
libsupc++-vmi_class_type_info \
gcc-m68k-support-for-tls-backport \
pr44626 \
arm-thumb2-speedup-division \
gcc-arm-implicit-it \
ppl-version \
else
debian_patches += \
pr45112
endif
# TODO: update ...
# libjava-rpath \
ifneq ($(GFDL_INVARIANT_FREE),yes)
debian_patches += \
$(if $(with_linaro_branch),,gcj-use-atomic-builtins-doc) \
gold-and-ld-doc
endif
hardening_patches =
ifneq ($(distribution),Debian)
ifneq (,$(findstring gcc-4, $(PKGSOURCE)))
hardening_patches += gcc-default-format-security \
gcc-default-fortify-source gcc-default-relro \
testsuite-hardening-format \
testsuite-hardening-fortify \
testsuite-hardening-printf-types
endif
endif
ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)
hardening_patches += gcc-default-ssp
endif
# FIXME 4.5: Drop and adjust symbols files
ifneq (,$(findstring 4.4, $(PKGSOURCE)))
debian_patches += pr39491
endif
ifeq ($(with_proto),yes)
debian_patches += deb-protoize
endif
ifeq ($(with_ada),yes)
debian_patches += \
ada-driver-check \
ada-gcc-name \
ada-default-project-path \
ada-symbolic-tracebacks \
ada-library-project-files-soname \
ada-polyorb-dsa \
ada-bug589164 \
ada-bug601133
ifeq ($(biarch64),yes)
debian_patches += \
ada-nobiarch-check
endif
ifeq ($(with_libgnat),yes)
debian_patches += \
ada-gnatvsn \
ada-link-lib \
ada-libgnatvsn \
ada-libgnatprj \
ada-acats
ifeq ($(with_gnat_zcx)-$(with_gnat_sjlj),yes-yes)
debian_patches += \
ada-sjlj
endif
endif
ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd)
debian_patches += ada-bug564232
endif
endif
# gcc-4.4 is not yet supported by gpc
ifeq ($(with_pascal),yes)
#
else
# debian_patches += gcc-pascal-lang
endif
ifeq ($(with_d),yes)
debian_patches += \
gdc-4.4$(if $(with_linaro_branch),-linaro) \
gdc-hg-updates \
gdc-hg-doc-updates \
gdc-ice-valist \
gdc-stubs \
gdc-fix-build-kbsd \
gdc-fix-build-arm \
gdc-pr26885 \
gdc-driver-zlib \
gdc-libphobos-math \
gdc-libphobos-std-format
ifeq ($(with_libphobos),yes)
debian_patches += gdc-libphobos-build
else
debian_patches += gdc-driver-nophobos
endif
ifeq ($(with_multiarch_lib),yes)
debian_patches += gdc-multiarch
endif
else
debian_patches += gcc-d-lang
endif
ifeq ($(DEB_TARGET_ARCH_OS),hurd)
debian_patches += hurd-changes hurd-pthread
endif
ifeq ($(DEB_TARGET_ARCH),alpha)
debian_patches += alpha-ieee mudflap-nocheck
ifneq ($(GFDL_INVARIANT_FREE),yes)
debian_patches += alpha-ieee-doc
endif
endif
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf))
debian_patches += libjava-armel-unwind
debian_patches += $(if $(with_linaro_branch),,arm-gcc-gcse)
debian_patches += $(if $(with_linaro_branch),armhf-triplet-backport)
endif
ifeq ($(distribution),Ubuntu)
# times out on the buildd
debian_patches += libstdc++-arm-no-check
endif
debian_patches += gcc-arm-earlyclobbers
debian_patches += \
$(if $(with_linaro_branch),,pr40133) \
$(if $(with_linaro_branch),,pr40134) \
#ifeq ($(DEB_TARGET_ARCH),lpia)
# debian_patches += gcc-atom gcc-atom-doc
#endif
ifeq ($(DEB_TARGET_ARCH),m68k)
debian_patches += m68k-multilib
debian_patches += pr41302
debian_patches += pr43804
debian_patches += pr37053
debian_patches += pr46179
debian_patches += pr39531
debian_patches += pr41064
debian_patches += pr47908
endif
ifeq ($(DEB_TARGET_ARCH),powerpcspe)
debian_patches += powerpc_remove_many
endif
ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd)
debian_patches += kbsd-gnu
debian_patches += kbsd-gnu-ada
endif
ifneq (,$(findstring sh4,$(DEB_TARGET_ARCH)))
debian_patches += sh4-mode-switching
endif
ifeq ($(DEB_CROSS),yes)
debian_patches += cross-include cross-fixes
endif
spu_patches = cell-branch$(if $(with_linaro_branch),-linaro)
ifneq ($(GFDL_INVARIANT_FREE),yes)
spu_patches += cell-branch-doc
endif
#debian_patches += link-libs
# all patches below this line are applied for gcc-snapshot builds as well
ifeq ($(PKGSOURCE),gcc-snapshot)
spu_patches =
debian_patches =
debian_patches += pr40521-revert-workaround
endif
debian_patches += gcc-ice-hack gcc-ice-apport
debian_patches += libjava-disable-static libjava-fixed-symlinks
debian_patches += \
$(if $(with_linaro_branch),,ada-arm-eabi) \
ada-mips
ifeq ($(distribution),Debian)
debian_patches += arm-unbreak-eabi-armv4t
endif
ifneq (,$(filter $(DEB_TARGET_ARCH), hppa))
# timeouts on the buildd's
debian_patches += libmudflap-no-testsuite
endif
debian_patches += gcc-multiarch
debian_patches += gcc-multiarch$(if $(with_linaro_branch),-linaro,-fsf)
ifeq ($(with_multiarch_lib),yes)
debian_patches += libjava-multiarch$(if $(with_linaro_branch),-linaro)
endif
debian_patches += gcc-powerpc-nof
ifeq ($(biarch64),yes)
ifeq (,$(findstring libjava, $(biarch_multidir_names)))
debian_patches += libjava-nobiarch-check
endif
debian_patches += config-ml
ifeq ($(DEB_CROSS),yes)
debian_patches += cross-biarch
endif
debian_patches += s390-biarch
endif
ifeq ($(biarch32),yes)
ifeq (,$(findstring libjava, $(biarch_multidir_names)))
debian_patches += libjava-nobiarch-check
endif
debian_patches += config-ml
endif
debian_patches += mips-triarch
ifeq ($(biarch32),yes)
ifeq ($(with_multiarch_lib),yes)
debian_patches += gcc-multilib64-multiarch
else
debian_patches += gcc-multilib64dir
endif
endif
series_stamp = $(stampdir)/02-series-stamp
series: $(series_stamp)
$(series_stamp):
echo $(strip $(addsuffix .diff,$(debian_patches))) \
| sed -r 's/ +/ /g' | tr " " "\n" > $(series_file)
ifneq (,$(strip $(hardening_patches)))
ifneq ($(DEB_CROSS),yes)
ifneq ($(PKGSOURCE),gcc-snapshot)
echo $(strip $(addsuffix .diff,$(hardening_patches))) \
| sed -r 's/ +/ /g' | tr " " "\n" >> $(series_file)
endif
endif
endif
sed -r 's/(.)$$/\1 -p1/' -i $(series_file)
touch $@
autotools_files := $(addprefix ./,$(foreach file,$(shell lsdiff --no-filename \
$(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \
| sed -r 's/[ab]\/src\//src\//' | sort | uniq),$(shell echo $(file) \
| egrep 'configure\.(ac|in)|Makefile\.(am|in)|acinclude.m4')))
autoconf_version = 2.59
ifeq ($(PKGSOURCE),gcc-snapshot)
# The actual version depends on the build-dependencies set by
# variable AUTO_BUILD_DEP in rules.conf. Here, we assume the
# correct version is installed.
autoconf_version =
endif
# FIXME: the auto* stuff is done every time for every subdir, which
# leads to build errors. Idea: record the auto* calls in the patch
# files (AUTO <dir> <auto-command with options>) and run them separately,
# maybe only once per directory).
$(patch_stamp): $(unpack_stamp) $(series_stamp)
QUILT_PATCHES=$(patchdir) \
quilt --quiltrc /dev/null push -a || test $$? = 2
ifneq (,$(filter svn-updates, $(debian_patches)))
awk '/^EOF/ {exit} p==1 {print} /EOF$$/ {p=1}' \
$(patchdir)/svn-updates.diff > src/LAST_UPDATED
endif
if ! test -f ./autotools_files ; then touch ./autotools_files ; fi
cd $(srcdir)/fixincludes && ./genfixes
rm -f $(srcdir)/gcc/gengtype-lex.c
for f in $(autotools_files) ; \
do case $$f in \
*/classpath/m4/acinclude.m4) \
: ;; \
*/configure.*|*/acinclude.m4) \
if grep ^"$$(md5sum $$f)"$$ ./autotools_files >/dev/null ; \
then echo "Skipping already regenerated file $$f." ; \
else \
echo "Running autoconf$(autoconf_version) in $$(dirname $$f)..." ; \
dir="$(CURDIR)"; cd $(CURDIR)/$$(dirname $$f) \
&& AUTOM4TE=/usr/bin/autom4te$(autoconf_version) autoconf$(autoconf_version) \
&& cd $$dir \
&& echo "$$(md5sum $$f)" >> ./autotools_files ; \
fi ;; \
*/Makefile.*) ;; \
*) echo "Unknown file: $$f"; false; \
esac; \
done
for i in $(debian_patches); do \
echo -e "\n$$i:" >> pxxx; \
sed -n 's/^# *DP: */ /p' $(patchdir)/$$i.diff >> pxxx; \
done
# -$(srcdir)/move-if-change pxxx $@
mv pxxx $@
unpatch:
QUILT_PATCHES=$(patchdir) \
quilt --quiltrc /dev/null pop -a -R || test $$? = 2
rm -rf .pc
for f in $(autotools_files); do \
rm -f $$(echo $$f | sed -r 's/\.(ac|am|in)$$//'); \
done
no_spu_patches = $(hardening_patches)
$(src_spu_stamp): $(patch_stamp)
rm -rf src-spu
ifeq (,$(strip $(no_spu_patches)))
ln -s src src-spu
else
cp -a src src-spu
set -e; \
for p in $(no_spu_patches); do \
list="$$p $$list"; \
done; \
for p in $$list; do \
echo "Revert for spu build: $$p"; \
patch -d src-spu -p2 -R < debian/patches/$$p.diff; \
done
endif
set -e; \
for p in $(spu_patches); do \
echo "Apply for spu build: $$p"; \
patch -d src-spu -p2 < debian/patches/$$p.diff; \
done
ifneq (,$(strip $(no_spu_patches)))
cd src-spu/libgfortran \
&& AUTOM4TE=/usr/bin/autom4te$(autoconf_version) autoconf$(autoconf_version)
endif
touch $@
patch: $(patch_stamp)
.PHONY: patch series quilt autotools
|