Skip to content

Cleanup build makefile#749

Open
ZERICO2005 wants to merge 3 commits intomasterfrom
cleanup_build_makefile
Open

Cleanup build makefile#749
ZERICO2005 wants to merge 3 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)

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