From: Hangbin Liu <haliu@redhat.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: matttbe@kernel.org, martineau@kernel.org, eliang@kernel.org,
netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests: mptcp: extend CFLAGS to keep options from environment
Date: Thu, 23 Jan 2025 08:43:40 +0000 [thread overview]
Message-ID: <Z5IBPOGvfPozjrl5@fedora> (raw)
In-Reply-To: <Z5IAU4X1084EFrEd@fedora>
On Thu, Jan 23, 2025 at 08:39:53AM +0000, Hangbin Liu wrote:
> On Thu, Jan 23, 2025 at 09:35:42AM +0100, Jan Stancek wrote:
> > Package build environments like Fedora rpmbuild introduced hardening
> > options (e.g. -pie -Wl,-z,now) by passing a -spec option to CFLAGS
> > and LDFLAGS.
> >
> > mptcp Makefile currently overrides CFLAGS but not LDFLAGS, which leads
> > to a mismatch and build failure, for example:
> > make[1]: *** [../../lib.mk:222: tools/testing/selftests/net/mptcp/mptcp_sockopt] Error 1
> > /usr/bin/ld: /tmp/ccqyMVdb.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
> > /usr/bin/ld: failed to set dynamic section sizes: bad value
> > collect2: error: ld returned 1 exit status
> >
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> > tools/testing/selftests/net/mptcp/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
> > index 8e3fc05a5397..9706bc73809f 100644
> > --- a/tools/testing/selftests/net/mptcp/Makefile
> > +++ b/tools/testing/selftests/net/mptcp/Makefile
> > @@ -2,7 +2,7 @@
> >
> > top_srcdir = ../../../../..
> >
> > -CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES)
> > +CFLAGS += -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES)
> >
> > TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \
> > simult_flows.sh mptcp_sockopt.sh userspace_pm.sh
> > --
> > 2.43.0
> >
>
> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Hmm, net-next is closed. Not sure if we can target this to net since it fixes
the build errors.
Thanks
Hangbin
next prev parent reply other threads:[~2025-01-23 8:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 8:35 [PATCH] selftests: mptcp: extend CFLAGS to keep options from environment Jan Stancek
2025-01-23 8:39 ` Hangbin Liu
2025-01-23 8:43 ` Hangbin Liu [this message]
2025-01-23 10:26 ` Matthieu Baerts
2025-01-23 10:44 ` Jan Stancek
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=Z5IBPOGvfPozjrl5@fedora \
--to=haliu@redhat.com \
--cc=eliang@kernel.org \
--cc=jstancek@redhat.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).