|
| 1 | +--- a/debian/patches/bugfix/sh/sh-boot-do-not-use-hyphen-in-exported-variable-name.patch 2025-08-18 08:52:57.020179827 +0000 |
| 2 | ++++ b//debian/patches/bugfix/sh/sh-boot-do-not-use-hyphen-in-exported-variable-name.patch 1970-01-01 00:00:00.000000000 +0000 |
| 3 | +@@ -1,95 +0,0 @@ |
| 4 | +-From: Ben Hutchings <ben@decadent.org.uk> |
| 5 | +-Date: Mon, 07 Feb 2022 00:00:26 +0100 |
| 6 | +-Subject: sh: Do not use hyphen in exported variable names |
| 7 | +- |
| 8 | +-arch/sh/Makefile defines and exports ld-bfd to be used by |
| 9 | +-arch/sh/boot/Makefile and arch/sh/boot/compressed/Makefile. However |
| 10 | +-some shells, including dash, will not pass through environment |
| 11 | +-variables whose name includes a hyphen. Usually GNU make does not use |
| 12 | +-a shell to recurse, but if e.g. $(srctree) contains '~' it will use a |
| 13 | +-shell here. |
| 14 | +- |
| 15 | +-Rename the variable to ld_bfd. |
| 16 | +- |
| 17 | +-(Another instance of this problem was fixed upstream by commit |
| 18 | +-82977af93a0d "sh: rename suffix-y to suffix_y".) |
| 19 | +- |
| 20 | +-References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sh4&ver=4.13%7Erc5-1%7Eexp1&stamp=1502943967&raw=0 |
| 21 | +-Fixes: ef9b542fce00 ("sh: bzip2/lzma uImage support.") |
| 22 | +-Signed-off-by: Ben Hutchings <ben@decadent.org.uk> |
| 23 | +---- |
| 24 | +- arch/sh/Makefile | 10 +++++----- |
| 25 | +- arch/sh/boot/compressed/Makefile | 4 ++-- |
| 26 | +- arch/sh/boot/romimage/Makefile | 4 ++-- |
| 27 | +- 3 files changed, 9 insertions(+), 9 deletions(-) |
| 28 | +- |
| 29 | +-Index: linux/arch/sh/Makefile |
| 30 | +-=================================================================== |
| 31 | +---- linux.orig/arch/sh/Makefile |
| 32 | +-+++ linux/arch/sh/Makefile |
| 33 | +-@@ -102,16 +102,16 @@ UTS_MACHINE := sh |
| 34 | +- LDFLAGS_vmlinux += -e _stext |
| 35 | +- |
| 36 | +- ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 37 | +--ld-bfd := elf32-sh-linux |
| 38 | +--LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd) |
| 39 | +-+ld_bfd := elf32-sh-linux |
| 40 | +-+LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld_bfd) |
| 41 | +- KBUILD_LDFLAGS += -EL |
| 42 | +- else |
| 43 | +--ld-bfd := elf32-shbig-linux |
| 44 | +--LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd) |
| 45 | +-+ld_bfd := elf32-shbig-linux |
| 46 | +-+LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld_bfd) |
| 47 | +- KBUILD_LDFLAGS += -EB |
| 48 | +- endif |
| 49 | +- |
| 50 | +--export ld-bfd |
| 51 | +-+export ld_bfd |
| 52 | +- |
| 53 | +- # Mach groups |
| 54 | +- machdir-$(CONFIG_SOLUTION_ENGINE) += mach-se |
| 55 | +-Index: linux/arch/sh/boot/compressed/Makefile |
| 56 | +-=================================================================== |
| 57 | +---- linux.orig/arch/sh/boot/compressed/Makefile |
| 58 | +-+++ linux/arch/sh/boot/compressed/Makefile |
| 59 | +-@@ -36,7 +36,7 @@ endif |
| 60 | +- |
| 61 | +- ccflags-remove-$(CONFIG_MCOUNT) += -pg |
| 62 | +- |
| 63 | +--LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ |
| 64 | +-+LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(IMAGE_OFFSET) -e startup \ |
| 65 | +- -T $(obj)/../../kernel/vmlinux.lds |
| 66 | +- |
| 67 | +- KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING |
| 68 | +-@@ -60,7 +60,7 @@ $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.b |
| 69 | +- |
| 70 | +- OBJCOPYFLAGS += -R .empty_zero_page |
| 71 | +- |
| 72 | +--LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T |
| 73 | +-+LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T |
| 74 | +- |
| 75 | +- $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE |
| 76 | +- $(call if_changed,ld) |
| 77 | +-Index: linux/arch/sh/boot/romimage/Makefile |
| 78 | +-=================================================================== |
| 79 | +---- linux.orig/arch/sh/boot/romimage/Makefile |
| 80 | +-+++ linux/arch/sh/boot/romimage/Makefile |
| 81 | +-@@ -13,7 +13,7 @@ mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) : |
| 82 | +- load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y) |
| 83 | +- obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y) |
| 84 | +- |
| 85 | +--LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \ |
| 86 | +-+LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(load-y) -e romstart \ |
| 87 | +- -T $(obj)/../../kernel/vmlinux.lds |
| 88 | +- |
| 89 | +- $(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE |
| 90 | +-@@ -24,7 +24,7 @@ OBJCOPYFLAGS += -j .empty_zero_page |
| 91 | +- $(obj)/zeropage.bin: vmlinux FORCE |
| 92 | +- $(call if_changed,objcopy) |
| 93 | +- |
| 94 | +--LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T |
| 95 | +-+LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T |
| 96 | +- |
| 97 | +- $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/zeropage.bin arch/sh/boot/zImage FORCE |
| 98 | +- $(call if_changed,ld) |
0 commit comments