All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gcc-runtime: Pass -nostartfiles when building dummy libstdc++.so
@ 2022-07-19  3:00 Khem Raj
  2022-07-19 15:41 ` [OE-core] " Jon Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2022-07-19  3:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

This is a dummy shared object therefore reduce dependencies further by
not requiring the C startup files, we wont use this shared library for
anything useful anyway

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 5d74e4494d1..3e1c799ba13 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
 	# libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
 	# tests. Create a dummy empty lib for the purposes of configure.
 	mkdir -p ${WORKDIR}/dummylib
-	touch ${WORKDIR}/dummylib/dummylib.c
-	${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o ${WORKDIR}/dummylib/libstdc++.so
+	${CC} -x c /dev/null -nostartfiles -shared -o ${WORKDIR}/dummylib/libstdc++.so
 	for d in libgcc ${RUNTIMETARGET}; do
 		echo "Configuring $d"
 		rm -rf ${B}/${TARGET_SYS}/$d/
-- 
2.37.1



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

* Re: [OE-core] [PATCH] gcc-runtime: Pass -nostartfiles when building dummy libstdc++.so
  2022-07-19  3:00 [PATCH] gcc-runtime: Pass -nostartfiles when building dummy libstdc++.so Khem Raj
@ 2022-07-19 15:41 ` Jon Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Mason @ 2022-07-19 15:41 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On Mon, Jul 18, 2022 at 11:00 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> This is a dummy shared object therefore reduce dependencies further by
> not requiring the C startup files, we wont use this shared library for
> anything useful anyway
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---

This resolved the build break I was seeing in zephyr of
 /builder/meta-arm/build/tmp/work/cortexm0-poky-eabi/gcc-runtime/12.1.0-r0/recipe-sysroot-native/usr/bin/arm-poky-eabi/../../libexec/arm-poky-eabi/gcc/arm-poky-eabi/12.1.0/ld:
cannot find crt0.o: No such file or directory

Thanks for getting this out so quickly Khem!


>  meta/recipes-devtools/gcc/gcc-runtime.inc | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
> index 5d74e4494d1..3e1c799ba13 100644
> --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
> @@ -68,8 +68,7 @@ do_configure () {
>         # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
>         # tests. Create a dummy empty lib for the purposes of configure.
>         mkdir -p ${WORKDIR}/dummylib
> -       touch ${WORKDIR}/dummylib/dummylib.c
> -       ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o ${WORKDIR}/dummylib/libstdc++.so
> +       ${CC} -x c /dev/null -nostartfiles -shared -o ${WORKDIR}/dummylib/libstdc++.so
>         for d in libgcc ${RUNTIMETARGET}; do
>                 echo "Configuring $d"
>                 rm -rf ${B}/${TARGET_SYS}/$d/
> --
> 2.37.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#168267): https://lists.openembedded.org/g/openembedded-core/message/168267
> Mute This Topic: https://lists.openembedded.org/mt/92475659/3616920
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [jdmason@kudzu.us]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

end of thread, other threads:[~2022-07-19 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  3:00 [PATCH] gcc-runtime: Pass -nostartfiles when building dummy libstdc++.so Khem Raj
2022-07-19 15:41 ` [OE-core] " Jon Mason

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.