[Ohrrpgce] SVN: teeemcee/8847 Fix non-standard C preprocessor usage in array.c
Ralph Versteegen
teeemcee at gmail.com
Fri Jun 9 10:28:09 PDT 2017
Oh! Turns out I was reading the GCC 5.0 changelog when I thought I was
reading the 4.8 one -- I had both open at once
On 10 June 2017 at 05:11, James Paige <Bob at hamsterrepublic.com> wrote:
> That changes the error I get, but the build still fails:
>
> Updated to revision 8847.
> james at ghostorchid:~/src/ohr/wip$ scons
> scons: Reading SConscript files ...
> Using target: linux arch: x86 gcc: gcc cc: gcc gcctarget:
> x86_64-linux-gnu fbcversion: 1050
> scons: done reading SConscript files.
> scons: Building targets ...
> fbc -c build/bmod.rbas.bas -o build/bmod.rbas.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c build/menustuf.rbas.bas -o build/menustuf.rbas.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c build/moresubs.rbas.bas -o build/moresubs.rbas.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> Generating ver.txt
> fbc -c build/savegame.rbas.bas -o build/savegame.rbas.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c build/purchase.rbas.bas -o build/purchase.rbas.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c build/common.rbas.bas -o build/game-common.rbas.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c build/loading.rbas.bas -o build/game-loading.rbas.o -mt -exx -g -O
> 2 -target linux -arch 686 -d IS_GAME -m game
> gcc -o build/os_unix.o -c -O3 -DFBCVERSION=1050 -m32
> -mpreferred-stack-boundary=2 -mno-sse -g -Wall --std=gnu99 os_unix.c
> fbc -c os_unix2.bas -o build/os_unix2.o -mt -exx -g -O 2 -target linux
> -arch 686
> fbc -c util.bas -o build/util.o -mt -exx -g -O 2 -target linux -arch 686
> gcc -o build/blit.o -c -O3 -DFBCVERSION=1050 -m32
> -mpreferred-stack-boundary=2 -mno-sse -g -Wall --std=gnu99 blit.c
> gcc -o build/array.o -c -O3 -DFBCVERSION=1050 -m32
> -mpreferred-stack-boundary=2 -mno-sse -g -Wall --std=gnu99 array.c
> array.c: In function 'mem_alloc':
> array.c:139:2: warning: implicit declaration of function
> '__builtin_smul_overflow' [-Wimplicit-function-declaration]
> if (smul_overflow(alloc, typetbl->element_len, &arraysize) ||
> ^
> array.c:140:6: warning: implicit declaration of function
> '__builtin_sadd_overflow' [-Wimplicit-function-declaration]
> sadd_overflow(arraysize, ARRAY_OVERHEAD, &arraysize))
> ^
> gcc -o build/miscc.o -c -O3 -DFBCVERSION=1050 -m32
> -mpreferred-stack-boundary=2 -mno-sse -g -Wall --std=gnu99 miscc.c
> g++ -o build/filelayer.o -c -O3 -DFBCVERSION=1050 -m32
> -mpreferred-stack-boundary=2 -mno-sse --std=c++0x -g -Wall
> -Wno-non-virtual-dtor filelayer.cpp
> fbc -c vector.bas -o build/vector.o -mt -exx -g -O 2 -target linux -arch
> 686
> gcc -o build/os_unix_wm.o -c -O3 -DFBCVERSION=1050 -m32
> -mpreferred-stack-boundary=2 -mno-sse -g -Wall --std=gnu99 os_unix_wm.c
> g++ -o build/surface.o -c -O3 -DFBCVERSION=1050 -m32
> -mpreferred-stack-boundary=2 -mno-sse --std=c++0x -g -Wall
> -Wno-non-virtual-dtor surface.cpp
> fbc -c game.bas -o build/game.o -mt -exx -g -O 2 -target linux -arch 686
> -d IS_GAME -m game
> fbc -c bmodsubs.bas -o build/bmodsubs.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c scriptcommands.bas -o build/scriptcommands.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c yetmore2.bas -o build/yetmore2.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c walkabouts.bas -o build/walkabouts.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c scripting.bas -o build/scripting.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c oldhsinterpreter.bas -o build/oldhsinterpreter.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c plankmenu.bas -o build/plankmenu.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c pathfinding.bas -o build/pathfinding.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c gfx_sdl.bas -o build/game-gfx_sdl.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c gfx_fb.bas -o build/game-gfx_fb.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c music_sdl.bas -o build/game-music_sdl.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c sdl_lumprwops.bas -o build/game-sdl_lumprwops.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c allmodex.bas -o build/game-allmodex.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c backends.bas -o build/game-backends.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c lumpfile.bas -o build/game-lumpfile.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c misc.bas -o build/game-misc.o -mt -exx -g -O 2 -target linux -arch
> 686 -d IS_GAME -m game
> fbc -c bam2mid.bas -o build/game-bam2mid.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c common_menus.bas -o build/game-common_menus.o -mt -exx -g -O 2
> -target linux -arch 686 -d IS_GAME -m game
> fbc -c bcommon.bas -o build/game-bcommon.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c menus.bas -o build/game-menus.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c browse.bas -o build/game-browse.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c reload.bas -o build/game-reload.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> fbc -c reloadext.bas -o build/game-reloadext.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c sliceedit.bas -o build/game-sliceedit.o -mt -exx -g -O 2 -target
> linux -arch 686 -d IS_GAME -m game
> fbc -c slices.bas -o build/game-slices.o -mt -exx -g -O 2 -target linux
> -arch 686 -d IS_GAME -m game
> g++ -O3 -DFBCVERSION=1050 -m32 -mpreferred-stack-boundary=2 -mno-sse
> --std=c++0x -g -Wall -Wno-non-virtual-dtor -o ohrrpgce-game
> build/bmod.rbas.o build/menustuf.rbas.o build/moresubs.rbas.o
> build/savegame.rbas.o build/purchase.rbas.o build/game-common.rbas.o
> build/game-loading.rbas.o build/os_unix.o build/os_unix2.o build/util.o
> build/blit.o build/base64.o build/unicode.o build/array.o build/miscc.o
> build/filelayer.o build/vector.o build/os_unix_wm.o build/rasterizer.o
> build/matrixMath.o build/surface.o build/lib/gif.o build/game.o
> build/bmodsubs.o build/scriptcommands.o build/yetmore2.o build/walkabouts.o
> build/scripting.o build/oldhsinterpreter.o build/plankmenu.o
> build/pathfinding.o build/game-gfx_sdl.o build/game-gfx_fb.o
> build/game-music_sdl.o build/game-sdl_lumprwops.o build/game-allmodex.o
> build/game-backends.o build/game-lumpfile.o build/game-misc.o
> build/game-bam2mid.o build/game-common_menus.o build/game-bcommon.o
> build/game-menus.o build/game-browse.o build/game-reload.o
> build/game-reloadext.o build/game-sliceedit.o build/game-slices.o "-Wl,-("
> -Wl,--add-needed -Wl,-L/usr/local/bin/../lib/freebasic/linux-x86
> /usr/local/bin/../lib/freebasic/linux-x86/fbrt0.o -lfbmt linux/fb_icon.c
> -lpthread -lncurses -lSDL -lfbgfxmt -lSDL -lSDL_mixer -lX11 -lXext -lXpm
> -lXrandr -lXrender "-Wl,-)"
> build/array.o: In function `mem_resize':
> /home/james/src/ohr/wip/array.c:194: undefined reference to
> `__builtin_smul_overflow'
> /home/james/src/ohr/wip/array.c:195: undefined reference to
> `__builtin_sadd_overflow'
> build/array.o: In function `mem_alloc':
> /home/james/src/ohr/wip/array.c:139: undefined reference to
> `__builtin_smul_overflow'
> /home/james/src/ohr/wip/array.c:140: undefined reference to
> `__builtin_sadd_overflow'
> collect2: error: ld returned 1 exit status
> scons: *** [ohrrpgce-game] Error 1
> scons: building terminated because of errors.
>
>
> On Fri, Jun 9, 2017 at 10:05 AM, <subversion at hamsterrepublic.com> wrote:
>
>> teeemcee
>> 2017-06-09 10:05:52 -0700 (Fri, 09 Jun 2017)
>> 93
>> Fix non-standard C preprocessor usage in array.c
>>
>> (Seems to work with more recent GCC's only)
>> ---
>> U wip/array.c
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
>
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20170610/093ded8b/attachment-0001.htm>
More information about the Ohrrpgce
mailing list