-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
GCC 10 contains a breaking change: it defaults to
-fno-common, which requires globals to be declared in exactly one C file, and referenced elsewhere withextern. [...] This could be fixed by declaring globals in exactly one place as noted above, or by explicitly passing-fcommonto gcc.
-Issue description on openal-soft
In Lime, this produces an error message when running lime rubuild:
/usr/bin/ld: obj/linux64/0fd0c071_panning.o:(.rodata+0x13a0): multiple definition of `FuMa2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xea0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_panning.o:(.rodata+0x13e0): multiple definition of `SN3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xee0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_panning.o:(.rodata+0x1420): multiple definition of `N3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xf20): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_ALu.o:(.rodata+0x3bfa0): multiple definition of `FuMa2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xea0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_ALu.o:(.rodata+0x3bfe0): multiple definition of `SN3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xee0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_ALu.o:(.rodata+0x3c020): multiple definition of `N3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xf20): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_bformatdec.o:(.rodata+0x300): multiple definition of `SN3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xee0): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_bformatdec.o:(.rodata+0x340): multiple definition of `N3D2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xf20): first defined here
/usr/bin/ld: obj/linux64/0fd0c071_bformatdec.o:(.rodata+0x2c0): multiple definition of `FuMa2N3DScale'; obj/linux64/0fd0c071_ALc.o:(.rodata+0xea0): first defined here
collect2: error: ld returned 1 exit status
Oddly, passing -fcommon to the linker doesn't work, and that's a backwards solution anyway. Instead, we should use openal-soft's fix, as implemented in 20f5e7c.
Metadata
Metadata
Assignees
Labels
No labels