All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC] [PATCH] lib32: Add support for linking 32bit programs on 64bit
Date: Tue, 28 Mar 2017 17:46:47 +0200	[thread overview]
Message-ID: <20170328154647.GK1045@rei> (raw)
In-Reply-To: <20170328153347.GJ1045@rei>

Hi!
> > I added "cve-2016-4997: CFLAGS += -m32" and it still tried to look in
> > "../../lib"
> 
> Hmm, that is not easy to fix, since this is target specific variable and
> we simply do not see the -m32 in the CFLAGS in the condition below.
> 
> We would have to set the LDFLAGS per target and I'm not sure if we can
> easily do that.
> 
> > > +ifeq ($(filter -m32,$(CFLAGS)),)
> > >  LDFLAGS				+= -L$(top_builddir)/lib
> > > +else
> > > +LDFLAGS				+= -L$(top_builddir)/lib32
> > > +endif

Try with this condition instead of the above ifeqs:

$(MAKE_TARGETS): LDFLAGS += -L$(top_builddir)/lib$(subst -m,,$(filter -m32,$(CFLAGS)))

It's a bit hairy but seems to work.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-03-28 15:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 10:01 [LTP] [RFC] [PATCH] lib32: Add support for linking 32bit programs on 64bit Cyril Hrubis
2017-03-28 14:55 ` Richard Palethorpe
2017-03-28 15:33   ` Cyril Hrubis
2017-03-28 15:46     ` Cyril Hrubis [this message]
2017-03-29  9:37       ` Richard Palethorpe
2017-03-29  8:36 ` Jan Stancek
2017-03-29  9:12   ` Cyril Hrubis
2017-03-29 12:48 ` Richard Palethorpe
2017-03-29 14:56   ` Richard Palethorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170328154647.GK1045@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.