Re: [OS-BUILD PATCH] Fix binutils breakage

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

 



From: Viktor Malik on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2749#note_1612448872

@dzickusrh @hertonrk-rh I'd suggest applying one more patch (in addition to
the above quoting change) to `samples/bpf/Makefile`:
```diff
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 4ccf4236031c..140c58959b07 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -150,6 +150,9 @@ always-y += ibumad_kern.o
 always-y += hbm_out_kern.o
 always-y += hbm_edt_kern.o

+TPROGS_CFLAGS += $(TPROGS_USER_CFLAGS)
+TPROGS_LDFLAGS += $(TPROGS_USER_LDFLAGS)
+
 ifeq ($(ARCH), arm)
 # Strip all except -D__LINUX_ARM_ARCH__ option needed to handle linux
 # headers when arm instruction set identification is requested.
@@ -312,7 +315,7 @@ XDP_SAMPLE_CFLAGS += -Wall -O2 \
                     -I$(LIBBPF_INCLUDE) \
                     -I$(src)/../../tools/testing/selftests/bpf

-$(obj)/$(XDP_SAMPLE): TPROGS_CFLAGS = $(XDP_SAMPLE_CFLAGS)
+$(obj)/$(XDP_SAMPLE): TPROGS_CFLAGS = $(XDP_SAMPLE_CFLAGS)
$(TPROGS_USER_CFLAGS)
 $(obj)/$(XDP_SAMPLE): $(src)/xdp_sample_user.h $(src)/xdp_sample_shared.h

 -include $(BPF_SAMPLES_PATH)/Makefile.target

```

and then updating this specfile change to:
```suggestion:-0+0
%{make} %{?_smp_mflags} TPROGS_USER_CFLAGS="%{?build_hostcflags}"
TPROGS_USER_LDFLAGS="%{?build_hostldflags}"
EXTRA_CFLAGS="%{?build_hostcflags}" EXTRA_LDFLAGS="%{?build_hostldflags}"
ARCH=$Arch V=1 M=samples/bpf/ VMLINUX_H="${RPM_VMLINUX_H}" || true
```

The `EXTRA_CFLAGS`/`EXTRA_LDFLAGS` setting should resolve the remaining -fPIE
error for libbpf.a.

@dzickusrh could you give this a try?
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux