All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/2] libc-bench: Do not override ldflags in makefile
@ 2021-06-25 22:05 Khem Raj
  2021-06-25 22:05 ` [meta-oe][PATCH 2/2] mpich: Add libgcc to ldflags on x86/glibc Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2021-06-25 22:05 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ot-override-ldflags-from-environment.patch | 30 +++++++++++++++++++
 .../libc-bench/libc-bench_git.bb              |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/libc-bench/libc-bench/0001-build-Do-not-override-ldflags-from-environment.patch

diff --git a/meta-oe/recipes-benchmark/libc-bench/libc-bench/0001-build-Do-not-override-ldflags-from-environment.patch b/meta-oe/recipes-benchmark/libc-bench/libc-bench/0001-build-Do-not-override-ldflags-from-environment.patch
new file mode 100644
index 0000000000..060b418fcd
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libc-bench/libc-bench/0001-build-Do-not-override-ldflags-from-environment.patch
@@ -0,0 +1,30 @@
+From 419dac71dd524a39ad2333e91334b4650e277a78 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 25 Jun 2021 09:43:00 -0700
+Subject: [PATCH] build: Do not override ldflags from environment
+
+bitbake passed LDFLAGS contain important information e.g. which compiler
+runtime to link etc. Therefore append -static to LDFLAGS instead
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index efda5c0..a867876 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,7 @@ SRCS = $(sort $(wildcard *.c))
+ OBJS = $(SRCS:.c=.o)
+ 
+ CFLAGS = -Os -D_XOPEN_SOURCE=700
+-LDFLAGS = -static
++LDFLAGS += -static
+ LIBS = -lpthread -lrt -lpthread
+ 
+ 
+-- 
+2.32.0
+
diff --git a/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb b/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb
index e813894316..f16bd99d5d 100644
--- a/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb
+++ b/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb
@@ -10,6 +10,7 @@ SRCREV = "b6b2ce5f9f87a09b14499cb00c600c601f022634"
 PV = "20110206+git${SRCPV}"
 
 SRC_URI = "git://git.musl-libc.org/libc-bench \
+           file://0001-build-Do-not-override-ldflags-from-environment.patch \
            "
 
 S = "${WORKDIR}/git"
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-oe][PATCH 2/2] mpich: Add libgcc to ldflags on x86/glibc
  2021-06-25 22:05 [meta-oe][PATCH 1/2] libc-bench: Do not override ldflags in makefile Khem Raj
@ 2021-06-25 22:05 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2021-06-25 22:05 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

The build needs them in some subcomponents, it does not come to front
when using libgcc as default but when compiler-rt is used then it does
not link because its expecting functions from libgcc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-devtools/mpich/mpich_3.4.2.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-devtools/mpich/mpich_3.4.2.bb b/meta-oe/recipes-devtools/mpich/mpich_3.4.2.bb
index 0ee02d685c..20df3620d0 100644
--- a/meta-oe/recipes-devtools/mpich/mpich_3.4.2.bb
+++ b/meta-oe/recipes-devtools/mpich/mpich_3.4.2.bb
@@ -31,7 +31,8 @@ PACKAGECONFIG += " \
 "
 PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
 
-LDFLAGS_append_x86-64 = " -lgcc"
+LDFLAGS_append_libc-glibc_x86-64 = " -lgcc"
+LDFLAGS_append_libc-glibc_x86 = " -lgcc"
 
 inherit autotools gettext pkgconfig
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-25 22:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 22:05 [meta-oe][PATCH 1/2] libc-bench: Do not override ldflags in makefile Khem Raj
2021-06-25 22:05 ` [meta-oe][PATCH 2/2] mpich: Add libgcc to ldflags on x86/glibc Khem Raj

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.