Skip to content

Cleanup build makefile#749

Open
ZERICO2005 wants to merge 4 commits intomasterfrom
cleanup_build_makefile
Open

Cleanup build makefile#749
ZERICO2005 wants to merge 4 commits intomasterfrom
cleanup_build_makefile

Conversation

@ZERICO2005
Copy link
Contributor

@ZERICO2005 ZERICO2005 commented Mar 15, 2026

FYI: common.mk is for building the toolchain, and makefile.mk is for users.

  • Important Change: Made it so include/c++/math.h gets included before include/math.h as required by the C++ standard.
  • cleaned up common.mk and makefile.mk.
  • split the arguments across multiple lines to make merge/rebase conflicts easier to deal with.
  • splitting the arguments also makes git blame/diff easier to read.
  • Added -Wshadow and -Wimplicit-int-conversion to common.mk.
  • -fno-threadsafe-statics was added to common.mk (prevents __cxa_guard_* functions from being emitted)

Cleaning up these makefiles also can help catch when they go out of sync

Other changes:

  • fixed -Wshadow and -Wimplicit-int-conversion warnings
  • fixed NULL dereference in fgetc/fputc when stream is NULL (caught with --analyze + some extra flags)

@ZERICO2005 ZERICO2005 requested a review from adriweb March 15, 2026 00:48
@ZERICO2005 ZERICO2005 force-pushed the cleanup_build_makefile branch from 0bc4571 to c5eed0b Compare March 15, 2026 00:50
@ZERICO2005 ZERICO2005 force-pushed the cleanup_build_makefile branch from c5eed0b to 32b8fe7 Compare March 15, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant