public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* cp: cannot stat 'libc/crt0.o': No such file or directory
@ 2022-01-28 10:25 Sebastian Huber
  2022-01-28 12:28 ` [PATCH/committed] newlib: hoist crt0 install up another dir Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Huber @ 2022-01-28 10:25 UTC (permalink / raw)
  To: newlib

Hello,

I tried to build Newlib b095628ecff1831b250f34d3b6b5787b3f247d63 and it 
fails in make install with:

make[8]: Entering directory 
'/tmp/sh/b-gcc-sparc-rtems6/sparc-rtems6/soft/newlib'
rm -f libm.a
/usr/bin/mkdir -p soft
ln libm/libm.a libm.a >/dev/null 2>/dev/null || cp libm/libm.a libm.a
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2  -msoft-float" 
"CCASFLAGS=-g -O2  -msoft-float" "CFLAGS_FOR_BUILD=-g -O2" 
"CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" 
"LDFLAGS=-msoft-float" "LIBCFLAGS=-g -O2  -msoft-float" 
"LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo 
--split-size=5000000 --split-size=5000000       " "PICFLAG=" 
"PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" 
"RUNTESTFLAGS=" "exec_prefix=/tmp/sh/i-sparc-rtems6" 
"infodir=/tmp/sh/i-sparc-rtems6/share/info" 
"libdir=/tmp/sh/i-sparc-rtems6/lib64" "prefix=/tmp/sh/i-sparc-rtems6" 
"tooldir=/tmp/sh/i-sparc-rtems6/sparc-rtems6" 
"top_toollibdir=/tmp/sh/i-sparc-rtems6/sparc-rtems6/lib/soft" 
"AR=/tmp/sh/i-sparc-rtems6/sparc-rtems6/bin/ar" 
"AS=/tmp/sh/b-gcc-sparc-rtems6/./gcc/as" 
"CC=/tmp/sh/b-gcc-sparc-rtems6/./gcc/xgcc 
-B/tmp/sh/b-gcc-sparc-rtems6/./gcc/ -nostdinc 
-B/tmp/sh/b-gcc-sparc-rtems6/sparc-rtems6/soft/newlib/ -isystem 
/tmp/sh/b-gcc-sparc-rtems6/sparc-rtems6/soft/newlib/targ-include 
-isystem /home/EB/sebastian_h/src/gcc/newlib/libc/include 
-B/tmp/sh/i-sparc-rtems6/sparc-rtems6/bin/ 
-B/tmp/sh/i-sparc-rtems6/sparc-rtems6/lib/ -isystem 
/tmp/sh/i-sparc-rtems6/sparc-rtems6/include -isystem 
/tmp/sh/i-sparc-rtems6/sparc-rtems6/sys-include  -msoft-float" 
"LD=/tmp/sh/b-gcc-sparc-rtems6/./gcc/collect-ld" "LIBCFLAGS=-g -O2 
-msoft-float" "NM=/tmp/sh/b-gcc-sparc-rtems6/./gcc/nm" "PICFLAG=" 
"RANLIB=/tmp/sh/i-sparc-rtems6/sparc-rtems6/bin/ranlib" "DESTDIR=" 
DO=all multi-do # make
rm -f soft/crt0.o
rm -f crt0.o
ln libc/crt0.o soft/crt0.o >/dev/null 2>/dev/null || cp libc/crt0.o 
soft/crt0.o
ln libc/crt0.o crt0.o >/dev/null 2>/dev/null || cp libc/crt0.o crt0.o
rm -rf libc.a libg.a tmp
rm -f soft/libm.a
mkdir tmp
ln libm.a soft/libm.a >/dev/null 2>/dev/null || cp libm.a soft/libm.a
cd tmp; \
  /tmp/sh/i-sparc-rtems6/sparc-rtems6/bin/ar x ../libm.a 
lib_a-s_fpclassify.o lib_a-sf_fpclassify.o lib_a-s_isinf.o 
lib_a-sf_isinf.o lib_a-s_isnan.o lib_a-sf_isnan.o lib_a-s_isinfd.o 
lib_a-sf_isinff.o lib_a-s_isnand.o lib_a-sf_isnanf.o lib_a-s_nan.o 
lib_a-sf_nan.o lib_a-s_ldexp.o lib_a-sf_ldexp.o lib_a-s_frexp.o 
lib_a-sf_frexp.o lib_a-frexpl.o lib_a-s_modf.o lib_a-sf_modf.o 
lib_a-s_scalbn.o lib_a-sf_scalbn.o lib_a-s_finite.o lib_a-sf_finite.o 
lib_a-s_copysign.o lib_a-sf_copysign.o ; \
  /tmp/sh/i-sparc-rtems6/sparc-rtems6/bin/ar x ../libc/libc.a ; \
  /tmp/sh/i-sparc-rtems6/sparc-rtems6/bin/ar rc ../libc.a *.o
cp: cannot stat 'libc/crt0.o': No such file or directory
make[8]: *** [Makefile:1149: soft/crt0.o] Error 1

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

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

* [PATCH/committed] newlib: hoist crt0 install up another dir
  2022-01-28 10:25 cp: cannot stat 'libc/crt0.o': No such file or directory Sebastian Huber
@ 2022-01-28 12:28 ` Mike Frysinger
  2022-01-28 12:54   ` Sebastian Huber
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2022-01-28 12:28 UTC (permalink / raw)
  To: newlib

Commit dd23de27c8e45513ad276f503a0036c3bc4e487b ("newlib: libc: install
CRT0 straight out of subdir") got rid of the libc/sys/ intermediate for
copying the file up, but the top-level newlib/ dir was still expecting
a libc/crt0.o to exist so it could install.  Update that to also look
for the crt0 file directly under libc/ like we already do for crt1.
---
 newlib/configure    | 2 +-
 newlib/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/newlib/configure b/newlib/configure
index 9bbb089a9c8a..31b790f2a3a7 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -12442,7 +12442,7 @@ CRT0=
 CRT0_DIR=
 if test "x${have_crt0}" = "xyes"; then
   CRT0=crt0.o
-  CRT0_DIR=libc/
+  CRT0_DIR=libc/sys/${sys_dir}/
 fi
  if test x$have_crt0 = xyes; then
   HAVE_CRT0_TRUE=
diff --git a/newlib/configure.ac b/newlib/configure.ac
index 13f318922605..cac2d7296ed8 100644
--- a/newlib/configure.ac
+++ b/newlib/configure.ac
@@ -361,7 +361,7 @@ CRT0=
 CRT0_DIR=
 if test "x${have_crt0}" = "xyes"; then
   CRT0=crt0.o
-  CRT0_DIR=libc/
+  CRT0_DIR=libc/sys/${sys_dir}/
 fi
 AM_CONDITIONAL(HAVE_CRT0, test x$have_crt0 = xyes)
 AC_SUBST(CRT0)
-- 
2.34.1


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

* Re: [PATCH/committed] newlib: hoist crt0 install up another dir
  2022-01-28 12:28 ` [PATCH/committed] newlib: hoist crt0 install up another dir Mike Frysinger
@ 2022-01-28 12:54   ` Sebastian Huber
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Huber @ 2022-01-28 12:54 UTC (permalink / raw)
  To: Mike Frysinger, newlib

On 28/01/2022 13:28, Mike Frysinger wrote:
> Commit dd23de27c8e45513ad276f503a0036c3bc4e487b ("newlib: libc: install
> CRT0 straight out of subdir") got rid of the libc/sys/ intermediate for
> copying the file up, but the top-level newlib/ dir was still expecting
> a libc/crt0.o to exist so it could install.  Update that to also look
> for the crt0 file directly under libc/ like we already do for crt1.

Thanks, this worked. I would have never found out this fix myself.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

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

end of thread, other threads:[~2022-01-28 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 10:25 cp: cannot stat 'libc/crt0.o': No such file or directory Sebastian Huber
2022-01-28 12:28 ` [PATCH/committed] newlib: hoist crt0 install up another dir Mike Frysinger
2022-01-28 12:54   ` Sebastian Huber

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 read-only IMAP folder(s) and NNTP newsgroup(s).