RE: [PATCH] backports: fix mconf compilation on Ubuntu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Wed, Oct 29, 2014 at 12:49 AM, Emmanuel Grumbach
> <emmanuel.grumbach@xxxxxxxxx> wrote:
> > Since
> >
> > commit de427857852e7194b9ae80571425ba0d2c29ef55
> > Author: Luis R. Rodriguez <mcgrof@xxxxxxxx>
> > 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.
> >
> > Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
> > ---
> >  backport/kconf/Makefile | 10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/backport/kconf/Makefile b/backport/kconf/Makefile index
> > dfd793a..8398f35 100644
> > --- a/backport/kconf/Makefile
> > +++ b/backport/kconf/Makefile
> > @@ -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.
> 

Bottom line you'd prefer something like this?
(still need to check how to compare)

diff --git a/backport/kconf/Makefile b/backport/kconf/Makefile
index dfd793a..5f76ef2 100644
--- a/backport/kconf/Makefile
+++ b/backport/kconf/Makefile
@@ -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))
+
+GCC_VERSION=$(shell gcc --version | head -1 | awk '{print $4}')
+ifeq ($(GCC_VERSION), 4.8.2)
+       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)

��.n��������+%������w��{.n����i���l�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux