libretro / parallel-n64

Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus.
319 stars 127 forks source link

Makefile cleanups #635

Closed MastaG closed 4 years ago

MastaG commented 4 years ago

Without -fcommon the build will fail with:

/usr/bin/ld: ./mupen64plus-core/src/dd/dd_disk.o:(.bss+0xc): multiple definition of CUR_BLOCK'; ./mupen64plus-core/src/dd/dd_controller.o:(.bss+0x8): first defined here /usr/bin/ld: ./mupen64plus-core/src/dd/dd_disk.o:(.bss+0x10): multiple definition ofdd_bm_mode_read'; ./mupen64plus-core/src/dd/dd_controller.o:(.bss+0xc): first defined here /usr/bin/ld: ./mupen64plus-core/src/plugin/emulate_game_controller_via_libretro.o:(.bss+0x24): multiple definition of alternate_mapping'; ./libretro/libretro.o:(.bss+0x3c): first defined here /usr/bin/ld: ./gles2n64/src/N64.o:(.bss+0x1008): multiple definition ofDMEM'; ./mupen64plus-rsp-cxd4/rsp.o:(.bss+0x154): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/Framebuffer_glide64.o:(.bss+0x50): multiple definition of _gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/Glide64_Ini.o:(.bss+0x0): multiple definition of_gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/glidemain.o:(.bss+0x116c): multiple definition of _gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/glide64_util.o:(.bss+0x8): multiple definition of_gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/Glide64_UCode.o:(.bss+0x0): multiple definition of _gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/glide64_gSP.o:(.bss+0x4): multiple definition of_gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/glide64_gDP.o:(.bss+0x0): multiple definition of _gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/Combine.o:(.bss+0x998): multiple definition of_gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/TexCache.o:(.bss+0x204007c): multiple definition of _gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/TexLoad.o:(.bss+0x0): multiple definition of_gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glide64/glide64_rdp.o:(.bss+0x1048): multiple definition of _gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glitch64/geometry.o:(.bss+0xea74): multiple definition of_gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here /usr/bin/ld: ./glide2gl/src/Glitch64/glitchmain.o:(.bss+0x54): multiple definition of `_gSPVertex'; ./glide2gl/src/Glide64/glide64_3dmath.o:(.bss+0x0): first defined here collect2: fout: ld gaf exit-status 1 terug

MastaG commented 4 years ago

Tested on Fedora 32 built with GCC 10 on XU4 running great. LTO seems to be unstable still so I disabled it by default as you can see in the description and commit.

EDIT: The Travis-CI seems broken?