bebbo / gcc

Bebbo's gcc-6-branch for m68k-amigaos
GNU General Public License v2.0
33 stars 11 forks source link

amissl does not link #81

Closed githubaf closed 4 years ago

githubaf commented 5 years ago

Out of curiosity I tried to compile https://github.com/jens-maus/amissl with your gcc.

Compilation/linking works with gcc 2.95 from https://github.com/adtools/amigaos-cross-toolchain

With your gcc it failes after a while with

#Compiled with
PATH=~/opt/m68k-amigaos_26Feb19/bin:$PATH make OS=os3

m68k-amigaos-gcc -mcrt=clib2 -m68020-60 -W -Wall -Wno-unused -O0 -g -gstabs -D__NO_NET_API -DB_ENDIAN -DOPENSSL_SYS_AMIGA -DOPENSSL_NO_STDIO -D__C_MACROS__ -DBN_DEBUG -DCONF_DEBUG -DDEBUG -DNO_INLINE_VARARGS -D__amigaos3__ -I../../include -I../../include/netinclude   -Iinclude -I../../openssl/include  -c -o test/afalgtest.o ../../openssl/test/afalgtest.c
rm -f test/afalgtest
${LDCMD:-m68k-amigaos-gcc} -mcrt=clib2 -m68020-60 -W -Wall -Wno-unused -O0 -g -gstabs -L. -L.. -mcrt=clib2 -resident32  \
                -o test/afalgtest test/afalgtest.o \
                test/libtestutil.a -lamisslauto -lamisslstubs -lamissldebug -lm 
/home/developer/opt/m68k-amigaos_26Feb19/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: /home/developer/opt/m68k-amigaos_26Feb19/m68k-amigaos/clib2/lib/libm020/libb32/libc.a(stdlib_main.o):(.text+0x9e): undefined reference to `main'

Are there additional options necessary with your compiler?

bebbo commented 5 years ago

it fails more early

m68k-amigaos-gcc: error: unrecognized command line option '-mrestore-a4'
arczi84 commented 4 years ago

I've compiled AmiSSL with gcc version 6.5.0b 191023121710 (GCC) out of the box with make OS=os3. When launching NetSurf I get: Couldn't initialize amisslmaster.library! SnoopDOS says it's loaded.

arczi84 commented 4 years ago

Amissl build fails here

/d/amiga-gcc2/bin/m68k-amigaos-ld: ./build_os3/amisslmaster_libinit.o: in function LibOpen': src/amisslmaster_libinit.c:864: undefined reference torestore_a4' /d/amiga-gcc2/bin/m68k-amigaos-ld: ./build_os3/amisslmaster_libinit.o: in function LibInit': src/amisslmaster_libinit.c:616: undefined reference torestore_a4' /d/amiga-gcc2/bin/m68k-amigaos-ld: ./build_os3/amisslmaster_libinit.o: in function LibExpunge': src/amisslmaster_libinit.c:798: undefined reference torestore_a4' /d/amiga-gcc2/bin/m68k-amigaos-ld: ./build_os3/amisslmaster_libinit.o: in function LibClose': src/amisslmaster_libinit.c:1106: undefined reference torestore_a4'

bebbo commented 4 years ago

you have to provide a __restore_a4() function which sets a4 to the correct value.

bebbo commented 4 years ago

any updates here?

arczi84 commented 4 years ago

Sorry bebbo, forgot about this thread.

I can't compile NetSurf with latest builds unfortunately but IIRC I could build AmiSSL.

bebbo commented 4 years ago

what's the problem with netsurf?

arczi84 commented 4 years ago

Errors like these appeared:

In file included from D:/amiga-gcc2/m68k-amigaos/clib2/include/stdlib.h:43:0, from /e/opt/netsurf/share/include/libcss/types.h:18, from /e/opt/netsurf/share/include/libcss/libcss.h:19, from content/handlers/css/utils.h:22, from desktop/treeview.c:42: D:/amiga-gcc2/m68k-amigaos/sys-include/stdlib.h: In function 'reallocarray': D:/amiga-gcc2/m68k-amigaos/sys-include/stdlib.h:146:54: error: unknown type name '__result_use_check' __stdargs void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size((2,3)); ^~~~~~~~~~~~~~~~~~

arczi84 commented 4 years ago

Compiles with original clib2 headers.

bebbo commented 4 years ago

closing - you better open tickets at amissl.