Re: REENTRANT_SYSCALLS_PROVIDED?

Josef Wolf <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Hello again,

On Di, Sep 11, 2018 at 01:27:09 +0100, [email protected] wrote:
> 
> Sorry, I should have made clear to pass that to make. E.g:
> 
> make CFLAGS_FOR_TARGET="-O2 -g -D..."
> 
> Works for me with other macros, at least.

Giving the setting to make, won't have any effect at all. The
REENTRANT_SYSCALLS_PROVIDED is not to be found in the build tree at all.

When I give the setting to configure, the setting at least is recorded in
config.log, config.status and Makefile:

$ grep CFLAGS_FOR_TARGET *
config.log:CFLAGS_FOR_TARGET='-g -O2 -DREENTRANT_SYSCALLS_PROVIDED'
config.log:DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
config.log:SYSROOT_CFLAGS_FOR_TARGET=''
config.status:S["CFLAGS_FOR_TARGET"]="-g -O2 -DREENTRANT_SYSCALLS_PROVIDED"
config.status:S["DEBUG_PREFIX_CFLAGS_FOR_TARGET"]=""
config.status:S["SYSROOT_CFLAGS_FOR_TARGET"]=""
grep: etc: Ist ein Verzeichnis
grep: m68k-unknown-elf: Ist ein Verzeichnis
Makefile:       CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
Makefile:CFLAGS_FOR_TARGET = -g -O2 -DREENTRANT_SYSCALLS_PROVIDED
Makefile:LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
Makefile:GOCFLAGS_FOR_TARGET = -O2 -g
Makefile:SYSROOT_CFLAGS_FOR_TARGET = 
Makefile:DEBUG_PREFIX_CFLAGS_FOR_TARGET = 
Makefile:XGCC_FLAGS_FOR_TARGET = $(FLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
Makefile:       "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
Makefile:       "GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
Makefile:       "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
Makefile:# *_CFLAGS_FOR_TARGET variables are not passed down and most often empty,
Makefile:       'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
Makefile:       'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
Makefile:       'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
$ 

but the reentrant functions are still there:

$ m68k-unknown-elf-gcc -nostartfiles -Wl,--cref,--section-start=vectors=0 \
   -Wl,-Ttext=0x400,--entry=entry -Wl,--oformat,elf32-m68k \
   -Wl,--cref,-Map,bestd.map \
      -Wl,-T,ldscript.be -ansi -pedantic -Wall -Wcast-align \
      -Wstrict-prototypes -Wmissing-prototypes -std=c89  -g -O2 \
      -fno-toplevel-reorder  -mcpu32  -o bestd.elf `cat bestd.objs` -lc \
/m/a/local/crossgcc/bin/../lib64/gcc/m68k-unknown-elf/8.2.0/../../../../m68k-unknown-elf/bin/ld:
/m/a/local/crossgcc/bin/../lib64/gcc/m68k-unknown-elf/8.2.0/../../../../m68k-unknown-elf/lib/mcpu32/libc.a(lib_a-makebuf.o):
in function `__swhatbuf_r':
/var/tmp/builds/crossgcc/src/newlib-3.0.0.20180802/newlib/libc/stdio/makebuf.c:96:
undefined reference to `fstat'

-- 
Josef Wolf
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.