Skip to contentSkip to conversation

backports: fix mconf compilation on Ubuntu

PATCH In review Emmanuel Grumbach 3 participants 10 messages Oct 29, 2014 – Nov 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backports: fix mconf compilation on Ubuntu

Since

commit de427857852e7194b9ae80571425ba0d2c29ef55

Author: Luis R. Rodriguez <[email protected]>
Date:   Sun Sep 14 06:05:29 2014 -0700

backports: fix mconf compilation library assumptions

I can't compile mconf on my Ubuntu trusty machine. This fixes that by making Luis's patch conditional.

---
 backport/kconf/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
backport/kconf/Makefile +9 -1
index dfd793a..8398f35 100644
@@ -3,7 +3,15 @@ CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
 LXDIALOG := lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o
 
 conf: conf.o zconf.tab.o
-mconf: LDFLAGS = -Wl,--no-as-needed $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
+
+RELEASE=$(shell lsb_release -si)
+ifeq ($(RELEASE), Ubuntu)
+	AS_NEEDED=--no-as-needed
+else
+	AS_NEEDED=--add-needed
+endif
+mconf: LDFLAGS = -Wl,$(AS_NEEDED) $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
+
 mconf: CFLAGS += -DCURSES_LOC="<ncurses.h>" -DLOCALE
 mconf: mconf.o zconf.tab.o $(LXDIALOG)
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 21 lines · Emmanuel Grumbach

Since

commit de427857852e7194b9ae80571425ba0d2c29ef55

Author: Luis R. Rodriguez <[email protected]>
Date:   Sun Sep 14 06:05:29 2014 -0700

backports: fix mconf compilation library assumptions

I can't compile mconf on my Ubuntu trusty machine. This fixes that by making Luis's patch conditional.

---
 backport/kconf/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
backport/kconf/Makefile +0 -0
index dfd793a..8398f35 100644

backport/kconf/Makefile CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer · line 7

Quoted 6 lines
backport/kconf/Makefile +2 -1
@@ -3,7 +3,15 @@ CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
 LXDIALOG := lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o
 
 conf: conf.o zconf.tab.o
-mconf: LDFLAGS = -Wl,--no-as-needed $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
+
+RELEASE=$(shell lsb_release -si)

I think we'll need to have this work for cases where lsb_release does not exist too. Since you're issue is with gcc 4.8.2 on ubuntu and since I know gcc 4.8.3 (opensuse) and gcc 4.9.1-15 (debian testing) works with the solution I provided I say we use the options I specified in the original patch as the default. If someone has a gcc older than or equal than gcc 4.8.2 but not on Ubuntu it'd be good to know if this issue is there as well as then we could just match this to the gcc version.

Luis

#2 lore raw

PiANCj4gT24gV2VkLCBPY3QgMjksIDIwMTQgYXQgMTI6NDkgQU0sIEVtbWFudWVsIEdydW1iYWNo DQo+IDxlbW1hbnVlbC5ncnVtYmFjaEBpbnRlbC5jb20+IHdyb3RlOg0KPiA+IFNpbmNlDQo+ID4N Cj4gPiBjb21taXQgZGU0Mjc4NTc4NTJlNzE5NGI5YWU4MDU3MTQyNWJhMGQyYzI5ZWY1NQ0KPiA+ IEF1dGhvcjogTHVpcyBSLiBSb2RyaWd1ZXogPG1jZ3JvZkBzdXNlLmNvbT4NCj4gPiBEYXRlOiAg IFN1biBTZXAgMTQgMDY6MDU6MjkgMjAxNCAtMDcwMA0KPiA+DQo+ID4gICAgIGJhY2twb3J0czog Zml4IG1jb25mIGNvbXBpbGF0aW9uIGxpYnJhcnkgYXNzdW1wdGlvbnMNCj4gPg0KPiA+IEkgY2Fu J3QgY29tcGlsZSBtY29uZiBvbiBteSBVYnV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0tIGEvYmFja3BvcnQva2NvbmYvTWFrZWZpbGUNCisrKyBiL2JhY2twb3J0L2tjb25mL01ha2Vm aWxlDQpAQCAtMyw3ICszLDE1IEBAIENGTEFHUz0tV2FsbCAtV21pc3NpbmctcHJvdG90eXBlcyAt V3N0cmljdC1wcm90b3R5cGVzIC1PMiAtZm9taXQtZnJhbWUtcG9pbnRlcg0KIExYRElBTE9HIDo9 IGx4ZGlhbG9nL2NoZWNrbGlzdC5vIGx4ZGlhbG9nL2lucHV0Ym94Lm8gbHhkaWFsb2cvbWVudWJv eC5vIGx4ZGlhbG9nL3RleHRib3gubyBseGRpYWxvZy91dGlsLm8gbHhkaWFsb2cveWVzbm8ubw0K IA0KIGNvbmY6IGNvbmYubyB6Y29uZi50YWIubw0KLW1jb25mOiBMREZMQUdTID0gLVdsLC0tbm8t YXMtbmVlZGVkICQoc2hlbGwgLi9seGRpYWxvZy9jaGVjay1seGRpYWxvZy5zaCAtbGRmbGFncyAk KENDKSkNCisNCitHQ0NfVkVSU0lPTj0kKHNoZWxsIGdjYyAtLXZlcnNpb24gfCBoZWFkIC0xIHwg YXdrICd7cHJpbnQgJDR9JykNCitpZmVxICgkKEdDQ19WRVJTSU9OKSwgNC44LjIpDQorICAgICAg IEFTX05FRURFRD0tLW5vLWFzLW5lZWRlZA0KK2Vsc2UNCisgICAgICAgQVNfTkVFREVEPS0tYWRk LW5lZWRlZA0KK2VuZGlmDQorbWNvbmY6IExERkxBR1MgPSAtV2wsJChBU19ORUVERUQpICQoc2hl bGwgLi9seGRpYWxvZy9jaGVjay1seGRpYWxvZy5zaCAtbGRmbGFncyAkKENDKSkNCisNCiBtY29u ZjogQ0ZMQUdTICs9IC1EQ1VSU0VTX0xPQz0iPG5jdXJzZXMuaD4iIC1ETE9DQUxFDQogbWNvbmY6 IG1jb25mLm8gemNvbmYudGFiLm8gJChMWERJQUxPRykNCg0K

#3 lore raw

Review

Quoted 2 lines · Emmanuel
(quoted diff) +2 -0
+GCC_VERSION=$(shell gcc --version | head -1 | awk '{print $4}')
+ifeq ($(GCC_VERSION), 4.8.2)

Luis, I can't really figure out why you think the *compiler* version matters? Maybe the linker version, but ...?

johannes

#4 lore raw
Quoted 7 lines · Johannes Berg

Review

Quoted 2 lines · Emmanuel
(quoted diff) +2 -0
+GCC_VERSION=$(shell gcc --version | head -1 | awk '{print $4}')
+ifeq ($(GCC_VERSION), 4.8.2)

Luis, I can't really figure out why you think the *compiler* version matters? Maybe the linker version, but ...?

You're right, and that's provided by libc. Well any other ideas?

Luis

#5 lore raw
Quoted 11 lines · Luis R. Rodriguez
Quoted 7 lines · Johannes Berg

Review

Quoted 2 lines · Emmanuel
(quoted diff) +2 -0
+GCC_VERSION=$(shell gcc --version | head -1 | awk '{print $4}')
+ifeq ($(GCC_VERSION), 4.8.2)

Luis, I can't really figure out why you think the *compiler* version matters? Maybe the linker version, but ...?

You're right, and that's provided by libc. Well any other ideas?

The only difference I can really find is that somehow we don't use the CFLAGS correctly from check-lxdialog.sh?

johannes

#6 lore raw
Quoted 11 lines · Johannes Berg
Quoted 10 lines · Luis R. Rodriguez
Quoted 7 lines · Johannes Berg

Review

Quoted 2 lines · Emmanuel
(quoted diff) +2 -0
+GCC_VERSION=$(shell gcc --version | head -1 | awk '{print $4}')
+ifeq ($(GCC_VERSION), 4.8.2)

Luis, I can't really figure out why you think the *compiler* version matters? Maybe the linker version, but ...?

Quoted 4 lines
Quoted 1 line

You're right, and that's provided by libc. Well any other ideas?

The only difference I can really find is that somehow we don't use the CFLAGS correctly from check-lxdialog.sh?

Well, why don't we do it like the kernel does?

http://p.sipsolutions.net/0e9267afce20addd.txt

johannes

#7 lore raw
Quoted 12 lines · Johannes Berg
Quoted 11 lines · Johannes Berg
Quoted 10 lines · Luis R. Rodriguez
Quoted 7 lines · Johannes Berg

Review

Quoted 2 lines · Emmanuel
(quoted diff) +2 -0
+GCC_VERSION=$(shell gcc --version | head -1 | awk '{print $4}')
+ifeq ($(GCC_VERSION), 4.8.2)

Luis, I can't really figure out why you think the *compiler* version matters? Maybe the linker version, but ...?

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

You're right, and that's provided by libc. Well any other ideas?

The only difference I can really find is that somehow we don't use the CFLAGS correctly from check-lxdialog.sh?

Well, why don't we do it like the kernel does?

http://p.sipsolutions.net/0e9267afce20addd.txt

IIRC my concern was over the usage of HOSTLOADLIBES_ stuff but you seem to have worked around that, lets try this way then.

Luis

#8 lore raw
Quoted 4 lines · Luis R. Rodriguez
Quoted 1 line

http://p.sipsolutions.net/0e9267afce20addd.txt

IIRC my concern was over the usage of HOSTLOADLIBES_ stuff but you seem to have worked around that, lets try this way then.

Yeah but that's just appended to the CC command line in the kernel, if you follow the various Makefiles. And HOSTLOADLIBES is empty for this Makefile, so I cut down the maze of definitions to the change above.

johannes

#9 lore raw
Quoted 10 lines · Johannes Berg
Quoted 4 lines · Luis R. Rodriguez
Quoted 1 line

http://p.sipsolutions.net/0e9267afce20addd.txt

IIRC my concern was over the usage of HOSTLOADLIBES_ stuff but you seem to have worked around that, lets try this way then.

Yeah but that's just appended to the CC command line in the kernel, if you follow the various Makefiles. And HOSTLOADLIBES is empty for this Makefile, so I cut down the maze of definitions to the change above.

Mended and pushed.

Luis