Skip to contentSkip to conversation

pc-bios/s390-ccw: use STRIP variable in Makefile

PATCH Applied Greg Kurz 5 participants 5 messages May 31, 2017

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

PATCH v2 1/1 pc-bios/s390-ccw: use STRIP variable in Makefile

The docker-run-test-build@debian-s390x-cross target fails with:

strip --strip-unneeded s390-ccw.elf -o s390-ccw.img
strip: Unable to recognise the format of the input file `s390-ccw.elf'

The configure script defines a STRIP makefile variable whose default value is ${cross_prefix}strip. Let's use it.

We default to using the non-prefixed strip command in case --enable-debug or --disable-strip was passed to configure during a regular build.

---
v2: - added default value
- no longer Cc: qemu-trivial as it turned out to be not that trivial

Philippe,

Please give your Reviewed-by again if you're okay with this change.

---
 pc-bios/s390-ccw/Makefile |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/Makefile +3 -1
index 79a46b67356f..fb88c13bc742 100644
@@ -21,8 +21,10 @@ build-all: s390-ccw.img
 s390-ccw.elf: $(OBJECTS)
 	$(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@")
 
+STRIP ?= strip
+
 s390-ccw.img: s390-ccw.elf
-	$(call quiet-command,strip --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
+	$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
 
 $(OBJECTS): Makefile
 
Reviewed-by on v2 1/1
#1 lore raw
Quoted 31 lines · Greg Kurz

The docker-run-test-build@debian-s390x-cross target fails with:

strip --strip-unneeded s390-ccw.elf -o s390-ccw.img
strip: Unable to recognise the format of the input file `s390-ccw.elf'

The configure script defines a STRIP makefile variable whose default value is ${cross_prefix}strip. Let's use it.

We default to using the non-prefixed strip command in case --enable-debug or --disable-strip was passed to configure during a regular build.

---
v2: - added default value
- no longer Cc: qemu-trivial as it turned out to be not that trivial

Philippe,

Please give your Reviewed-by again if you're okay with this change.

---
 pc-bios/s390-ccw/Makefile |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/Makefile +0 -0
index 79a46b67356f..fb88c13bc742 100644
@@ -21,8 +21,10 @@ build-all: s390-ccw.img
 s390-ccw.elf: $(OBJECTS)

pc-bios/s390-ccw/Makefile build-all: s390-ccw.img · line 30

Quoted 10 lines
pc-bios/s390-ccw/Makefile +3 -1
 	$(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@")
 
+STRIP ?= strip
+
 s390-ccw.img: s390-ccw.elf
-	$(call quiet-command,strip --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
+	$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
 
 $(OBJECTS): Makefile
 
Reviewed-by on v2 1/1
#2 lore raw
In reply to Greg Kurz
Quoted 31 lines · Greg Kurz

The docker-run-test-build@debian-s390x-cross target fails with:

strip --strip-unneeded s390-ccw.elf -o s390-ccw.img
strip: Unable to recognise the format of the input file `s390-ccw.elf'

The configure script defines a STRIP makefile variable whose default value is ${cross_prefix}strip. Let's use it.

We default to using the non-prefixed strip command in case --enable-debug or --disable-strip was passed to configure during a regular build.

---
v2: - added default value
- no longer Cc: qemu-trivial as it turned out to be not that trivial

Philippe,

Please give your Reviewed-by again if you're okay with this change.

---
 pc-bios/s390-ccw/Makefile |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/Makefile +0 -0
index 79a46b67356f..fb88c13bc742 100644
@@ -21,8 +21,10 @@ build-all: s390-ccw.img
 s390-ccw.elf: $(OBJECTS)

pc-bios/s390-ccw/Makefile build-all: s390-ccw.img · line 30

Quoted 10 lines
pc-bios/s390-ccw/Makefile +3 -1
 	$(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@")
 
+STRIP ?= strip
+
 s390-ccw.img: s390-ccw.elf
-	$(call quiet-command,strip --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
+	$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
 
 $(OBJECTS): Makefile
 
#3 lore raw
In reply to Greg Kurz
Quoted 30 lines · Greg Kurz

The docker-run-test-build@debian-s390x-cross target fails with:

strip --strip-unneeded s390-ccw.elf -o s390-ccw.img
strip: Unable to recognise the format of the input file `s390-ccw.elf'

The configure script defines a STRIP makefile variable whose default value is ${cross_prefix}strip. Let's use it.

We default to using the non-prefixed strip command in case --enable-debug or --disable-strip was passed to configure during a regular build.

---
v2: - added default value
- no longer Cc: qemu-trivial as it turned out to be not that trivial

Philippe,

Please give your Reviewed-by again if you're okay with this change.

---
 pc-bios/s390-ccw/Makefile |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/Makefile +0 -0
index 79a46b67356f..fb88c13bc742 100644
@@ -21,8 +21,10 @@ build-all: s390-ccw.img
 s390-ccw.elf: $(OBJECTS)

pc-bios/s390-ccw/Makefile build-all: s390-ccw.img · line 30

Quoted 10 lines
pc-bios/s390-ccw/Makefile +3 -1
 	$(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@")
 
+STRIP ?= strip
+
 s390-ccw.img: s390-ccw.elf
-	$(call quiet-command,strip --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
+	$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
 
 $(OBJECTS): Makefile
 

applied, thanks.

#4 lore raw
Quoted 12 lines · Greg Kurz
Quoted 11 lines

The docker-run-test-build@debian-s390x-cross target fails with:

strip --strip-unneeded s390-ccw.elf -o s390-ccw.img
strip: Unable to recognise the format of the input file `s390-ccw.elf'

The configure script defines a STRIP makefile variable whose default value is ${cross_prefix}strip. Let's use it.

We default to using the non-prefixed strip command in case --enable-debug or --disable-strip was passed to configure during a regular build.

Quoted 8 lines
Quoted 8 lines

---
v2: - added default value
- no longer Cc: qemu-trivial as it turned out to be not that trivial

Philippe,

Please give your Reviewed-by again if you're okay with this change.

I'm Ok but it got applied faster ;)

Quoted 22 lines
Quoted 11 lines
---
 pc-bios/s390-ccw/Makefile |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/Makefile +0 -0
index 79a46b67356f..fb88c13bc742 100644
@@ -21,8 +21,10 @@ build-all: s390-ccw.img
 s390-ccw.elf: $(OBJECTS)

pc-bios/s390-ccw/Makefile build-all: s390-ccw.img · line 30

Quoted 10 lines
pc-bios/s390-ccw/Makefile +3 -1
 	$(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@")
 
+STRIP ?= strip
+
 s390-ccw.img: s390-ccw.elf
-	$(call quiet-command,strip --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
+	$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
 
 $(OBJECTS): Makefile
 

applied, thanks.