Fix build on modern Linux (GCC 10+, ALSA/OSS)#1
Open
Cormoran96 wants to merge 3 commits into
Open
Conversation
Sync all source files from the latest distributed archive (v1.4), which includes fixes and additions not yet pushed to the repository.
GCC 10 changed the default from -fcommon to -fno-common, causing linker errors for tentative variable definitions in headers included by multiple translation units. Adding -fcommon restores the previous behaviour and allows the project to build on modern toolchains.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
1. Sync source to latest v1.4 snapshot
Several source files had local fixes and additions that were never pushed to
the repository (
controls.c/h,groovit.c/h,grpattern.c,grsequence.c,menu_board.c,readsample.c,settings.c).2. Fix build with GCC 10+
GCC 10 changed the default from
-fcommonto-fno-common. This projectdefines globals in headers included by multiple translation units, which now
causes "multiple definition" linker errors. Adding
-fcommontoCC_OPTIONSrestores the previous behaviour.
3. Add README
Documents how to build and run on a modern Debian/Ubuntu system:
sudo apt install build-essential libncurses-dev oss-compat alsa-oss sudo modprobe snd-pcm-oss make fastconfig && make aoss ./groovit myfile.grovTested on