cross-compile test broken

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cross-compile test broken

Christian Jullien-3

Hi Grischka,

 

You last commit looks broken for cross-test on a RPi:

------------ cross-test ------------

. i386

. i386-win32

In file included from ../tcc.c:23:

In file included from ../libtcc.c:24:

../tccelf.c:2659: error: 'roinf_use' undeclared

make[2]: *** [Makefile:282: cross-test] Error 1

 

Ditto for Windows port using Cygwin

# Stage 1

stage1: Bootstrapping 32bits and 64bits tools with gcc -m64

In file included from ../libtcc.c:24,

                 from ../tcc.c:23:

../tccelf.c: In function ‘elf_output_file’:

../tccelf.c:2659:11: error: ‘roinf_use’ undeclared (first use in this function)

2659 |  phnum++, roinf_use = &roinf;

 

Also the OpenBSD aarch64 port which was almost complete is now broken for an unclear reason:

 

./configure --strip-binaries --with-selinux --cc=clang --prefix=/home/jullien/tinycc/static

Binary directory    /home/jullien/tinycc/static/bin

TinyCC directory    /home/jullien/tinycc/static/lib/tcc

Library directory   /home/jullien/tinycc/static/lib

Include directory   /home/jullien/tinycc/static/include

Manual directory    /home/jullien/tinycc/static/share/man

Info directory      /home/jullien/tinycc/static/share/info

Doc directory       /home/jullien/tinycc/static/share/doc

Source path         /home/jullien/tinycc

C compiler          clang (10.0)

Target OS           OpenBSD

CPU                 aarch64

Config              BSD ldl=no strip selinux

Creating config.mak and config.h

clang -o tcc.o -c tcc.c -DHAVE_SELINUX -DTCC_TARGET_ARM64 -DTARGETOS_OpenBSD        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I.

ar rcs libtcc.a

clang -o tcc tcc.o libtcc.a -lm -lpthread -s

ld: error: undefined symbol: tcc_realloc

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

ld: error: undefined symbol: tcc_malloc

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

ld: error: undefined symbol: tcc_free

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

 

I’


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: cross-compile test broken

Christian Jullien-3

On macOS I get this error:

------------ cross-test ------------

. i386

. i386-win32

. x86_64

. x86_64-win32

. x86_64-osx

. x86_64-FreeBSD

. x86_64-NetBSD

. x86_64-OpenBSD

In file included from ../tcc.c:23:

../libtcc.c:1137: warning: implicit declaration of function 'strtonum'

In file included from ../tcc.c:23:

../libtcc.c:1137: error: 'LLONG_MAX' undeclared

make[2]: *** [cross-test] Error 1

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=[hidden email]] On Behalf Of Christian Jullien
Sent: Monday, January 11, 2021 16:43
To: [hidden email]
Subject: [Tinycc-devel] cross-compile test broken

 

Hi Grischka,

 

You last commit looks broken for cross-test on a RPi:

------------ cross-test ------------

. i386

. i386-win32

In file included from ../tcc.c:23:

In file included from ../libtcc.c:24:

../tccelf.c:2659: error: 'roinf_use' undeclared

make[2]: *** [Makefile:282: cross-test] Error 1

 

Ditto for Windows port using Cygwin

# Stage 1

stage1: Bootstrapping 32bits and 64bits tools with gcc -m64

In file included from ../libtcc.c:24,

                 from ../tcc.c:23:

../tccelf.c: In function ‘elf_output_file’:

../tccelf.c:2659:11: error: ‘roinf_use’ undeclared (first use in this function)

2659 |  phnum++, roinf_use = &roinf;

 

Also the OpenBSD aarch64 port which was almost complete is now broken for an unclear reason:

 

./configure --strip-binaries --with-selinux --cc=clang --prefix=/home/jullien/tinycc/static

Binary directory    /home/jullien/tinycc/static/bin

TinyCC directory    /home/jullien/tinycc/static/lib/tcc

Library directory   /home/jullien/tinycc/static/lib

Include directory   /home/jullien/tinycc/static/include

Manual directory    /home/jullien/tinycc/static/share/man

Info directory      /home/jullien/tinycc/static/share/info

Doc directory       /home/jullien/tinycc/static/share/doc

Source path         /home/jullien/tinycc

C compiler          clang (10.0)

Target OS           OpenBSD

CPU                 aarch64

Config              BSD ldl=no strip selinux

Creating config.mak and config.h

clang -o tcc.o -c tcc.c -DHAVE_SELINUX -DTCC_TARGET_ARM64 -DTARGETOS_OpenBSD        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I.

ar rcs libtcc.a

clang -o tcc tcc.o libtcc.a -lm -lpthread -s

ld: error: undefined symbol: tcc_realloc

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

ld: error: undefined symbol: tcc_malloc

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

ld: error: undefined symbol: tcc_free

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

 

I’


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: cross-compile test broken

Christian Jullien-3
In reply to this post by Christian Jullien-3

Grischka, as we are actively working on *BSD ports, I pushed

 

diff --git a/Makefile b/Makefile

index a0d3fd6..d0b4574 100644

--- a/Makefile

+++ b/Makefile

@@ -62,9 +62,10 @@ else

   endif

   export MACOSX_DEPLOYMENT_TARGET := 10.6

  endif

- ifdef CONFIG_BSD

-  NATIVE_TARGET = $(ARCH)-$(TARGETOS)

- endif

+ # Unclear why the following ifdef was defined. Build fails on all *BSD

+ #ifdef CONFIG_BSD

+ # NATIVE_TARGET = $(ARCH)-$(TARGETOS)

+ #endif

endif

 

Which allows the BSD ports to build back again, we hope it’s Ok, otherwise please fix it differently.

 

With Herman, we also fixed few other things, esp. for OpenBSD ports.

I noticed you reverted my change for “make install” which now always strips. It is unfortunately not yet supported on OpenBSD when tcc is built with tcc.

 

IMHO, when you choose to not use –strip-binaries, “make install” should install wo. stripping or use “make install-strip” if you want stripped installed binaries.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=[hidden email]] On Behalf Of Christian Jullien
Sent: Monday, January 11, 2021 16:43
To: [hidden email]
Subject: [Tinycc-devel] cross-compile test broken

 

Hi Grischka,

 

You last commit looks broken for cross-test on a RPi:

------------ cross-test ------------

. i386

. i386-win32

In file included from ../tcc.c:23:

In file included from ../libtcc.c:24:

../tccelf.c:2659: error: 'roinf_use' undeclared

make[2]: *** [Makefile:282: cross-test] Error 1

 

Ditto for Windows port using Cygwin

# Stage 1

stage1: Bootstrapping 32bits and 64bits tools with gcc -m64

In file included from ../libtcc.c:24,

                 from ../tcc.c:23:

../tccelf.c: In function ‘elf_output_file’:

../tccelf.c:2659:11: error: ‘roinf_use’ undeclared (first use in this function)

2659 |  phnum++, roinf_use = &roinf;

 

Also the OpenBSD aarch64 port which was almost complete is now broken for an unclear reason:

 

./configure --strip-binaries --with-selinux --cc=clang --prefix=/home/jullien/tinycc/static

Binary directory    /home/jullien/tinycc/static/bin

TinyCC directory    /home/jullien/tinycc/static/lib/tcc

Library directory   /home/jullien/tinycc/static/lib

Include directory   /home/jullien/tinycc/static/include

Manual directory    /home/jullien/tinycc/static/share/man

Info directory      /home/jullien/tinycc/static/share/info

Doc directory       /home/jullien/tinycc/static/share/doc

Source path         /home/jullien/tinycc

C compiler          clang (10.0)

Target OS           OpenBSD

CPU                 aarch64

Config              BSD ldl=no strip selinux

Creating config.mak and config.h

clang -o tcc.o -c tcc.c -DHAVE_SELINUX -DTCC_TARGET_ARM64 -DTARGETOS_OpenBSD        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I.

ar rcs libtcc.a

clang -o tcc tcc.o libtcc.a -lm -lpthread -s

ld: error: undefined symbol: tcc_realloc

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

ld: error: undefined symbol: tcc_malloc

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

ld: error: undefined symbol: tcc_free

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

>>> referenced by tcc.c

>>>               tcc.o:(tcc_tool_ar)

 

 

I’


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel