build: Very minor QOL fixes
This commit is contained in:
parent
b4649f8808
commit
9bcad9d258
@ -39,9 +39,6 @@ override BUILD_PXE := @BUILD_PXE@
|
|||||||
override BUILD_CD := @BUILD_CD@
|
override BUILD_CD := @BUILD_CD@
|
||||||
override BUILD_LIMINE_DEPLOY := @BUILD_LIMINE_DEPLOY@
|
override BUILD_LIMINE_DEPLOY := @BUILD_LIMINE_DEPLOY@
|
||||||
|
|
||||||
override WERROR := @WERROR@
|
|
||||||
export WERROR
|
|
||||||
|
|
||||||
$(eval $(call DEFAULT_VAR,CC,@CC@))
|
$(eval $(call DEFAULT_VAR,CC,@CC@))
|
||||||
export CC
|
export CC
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ override CROSS_CFLAGS += \
|
|||||||
-fno-lto \
|
-fno-lto \
|
||||||
-Wshadow \
|
-Wshadow \
|
||||||
-Wvla \
|
-Wvla \
|
||||||
$(WERROR) \
|
|
||||||
-MMD \
|
-MMD \
|
||||||
-DCOM_OUTPUT=$(COM_OUTPUT) \
|
-DCOM_OUTPUT=$(COM_OUTPUT) \
|
||||||
-DE9_OUTPUT=$(E9_OUTPUT) \
|
-DE9_OUTPUT=$(E9_OUTPUT) \
|
||||||
|
43
configure.ac
43
configure.ac
@ -1,4 +1,4 @@
|
|||||||
AC_INIT([Limine], m4_esyscmd([./version.sh]), [https://github.com/limine-bootloader/limine/issues], [limine], [https://limine-bootloader.org/])
|
AC_INIT([Limine], [m4_esyscmd([./version.sh])], [https://github.com/limine-bootloader/limine/issues], [limine], [https://limine-bootloader.org/])
|
||||||
|
|
||||||
AC_PREREQ([2.69])
|
AC_PREREQ([2.69])
|
||||||
|
|
||||||
@ -17,12 +17,12 @@ AC_LANG([C])
|
|||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|
||||||
AC_CHECK_HEADERS([stdint.h stddef.h stdbool.h limits.h inttypes.h stdio.h stdlib.h string.h],
|
AC_CHECK_HEADERS([stdint.h stddef.h stdbool.h limits.h inttypes.h stdio.h stdlib.h string.h],
|
||||||
[], AC_MSG_ERROR([required header not found]))
|
[], [AC_MSG_ERROR([required header not found])])
|
||||||
|
|
||||||
werror_state="no"
|
werror_state="no"
|
||||||
AC_ARG_ENABLE([werror],
|
AC_ARG_ENABLE([werror],
|
||||||
AS_HELP_STRING([--enable-werror], [treat warnings as errors]),
|
[AS_HELP_STRING([--enable-werror], [treat warnings as errors])],
|
||||||
werror_state="$enableval")
|
[werror_state="$enableval"])
|
||||||
if test "$werror_state" = "yes"; then
|
if test "$werror_state" = "yes"; then
|
||||||
AC_SUBST([WERROR], [-Werror])
|
AC_SUBST([WERROR], [-Werror])
|
||||||
CFLAGS="$CFLAGS -Werror"
|
CFLAGS="$CFLAGS -Werror"
|
||||||
@ -57,30 +57,30 @@ rm -rf "$BUILDDIR/cross-files"
|
|||||||
BUILD_ALL="no"
|
BUILD_ALL="no"
|
||||||
|
|
||||||
AC_ARG_ENABLE([all],
|
AC_ARG_ENABLE([all],
|
||||||
AS_HELP_STRING([--enable-all], [enable ALL options]),
|
[AS_HELP_STRING([--enable-all], [enable ALL ports])],
|
||||||
BUILD_ALL="$enableval")
|
[BUILD_ALL="$enableval"])
|
||||||
|
|
||||||
BUILD_CD="$BUILD_ALL"
|
BUILD_CD="$BUILD_ALL"
|
||||||
|
|
||||||
AC_ARG_ENABLE([bios-cd],
|
AC_ARG_ENABLE([bios-cd],
|
||||||
AS_HELP_STRING([--enable-bios-cd], [enable building the x86 BIOS CD image]),
|
[AS_HELP_STRING([--enable-bios-cd], [enable building the x86 BIOS CD image])],
|
||||||
BUILD_CD="$enableval")
|
[BUILD_CD="$enableval"])
|
||||||
|
|
||||||
AC_SUBST([BUILD_CD])
|
AC_SUBST([BUILD_CD])
|
||||||
|
|
||||||
BUILD_PXE="$BUILD_ALL"
|
BUILD_PXE="$BUILD_ALL"
|
||||||
|
|
||||||
AC_ARG_ENABLE([bios-pxe],
|
AC_ARG_ENABLE([bios-pxe],
|
||||||
AS_HELP_STRING([--enable-bios-pxe], [enable building the x86 BIOS PXE image]),
|
[AS_HELP_STRING([--enable-bios-pxe], [enable building the x86 BIOS PXE image])],
|
||||||
BUILD_PXE="$enableval")
|
[BUILD_PXE="$enableval"])
|
||||||
|
|
||||||
AC_SUBST([BUILD_PXE])
|
AC_SUBST([BUILD_PXE])
|
||||||
|
|
||||||
BUILD_BIOS="$BUILD_ALL"
|
BUILD_BIOS="$BUILD_ALL"
|
||||||
|
|
||||||
AC_ARG_ENABLE([bios],
|
AC_ARG_ENABLE([bios],
|
||||||
AS_HELP_STRING([--enable-bios], [enable building the x86 BIOS port]),
|
[AS_HELP_STRING([--enable-bios], [enable building the x86 BIOS port])],
|
||||||
BUILD_BIOS="$enableval")
|
[BUILD_BIOS="$enableval"])
|
||||||
|
|
||||||
BUILD_LIMINE_DEPLOY="$BUILD_BIOS"
|
BUILD_LIMINE_DEPLOY="$BUILD_BIOS"
|
||||||
|
|
||||||
@ -112,8 +112,8 @@ AC_SUBST([BUILD_LIMINE_DEPLOY])
|
|||||||
BUILD_UEFI_IA32="$BUILD_ALL"
|
BUILD_UEFI_IA32="$BUILD_ALL"
|
||||||
|
|
||||||
AC_ARG_ENABLE([uefi-ia32],
|
AC_ARG_ENABLE([uefi-ia32],
|
||||||
AS_HELP_STRING([--enable-uefi-ia32], [enable building the IA-32 UEFI port]),
|
[AS_HELP_STRING([--enable-uefi-ia32], [enable building the IA-32 UEFI port])],
|
||||||
BUILD_UEFI_IA32="$enableval")
|
[BUILD_UEFI_IA32="$enableval"])
|
||||||
|
|
||||||
if test "x$BUILD_UEFI_IA32" = "xno"; then
|
if test "x$BUILD_UEFI_IA32" = "xno"; then
|
||||||
BUILD_UEFI_IA32=""
|
BUILD_UEFI_IA32=""
|
||||||
@ -132,8 +132,8 @@ AC_SUBST([BUILD_UEFI_IA32])
|
|||||||
BUILD_UEFI_X86_64="$BUILD_ALL"
|
BUILD_UEFI_X86_64="$BUILD_ALL"
|
||||||
|
|
||||||
AC_ARG_ENABLE([uefi-x86-64],
|
AC_ARG_ENABLE([uefi-x86-64],
|
||||||
AS_HELP_STRING([--enable-uefi-x86-64], [enable building the x86-64 UEFI port]),
|
[AS_HELP_STRING([--enable-uefi-x86-64], [enable building the x86-64 UEFI port])],
|
||||||
BUILD_UEFI_X86_64="$enableval")
|
[BUILD_UEFI_X86_64="$enableval"])
|
||||||
|
|
||||||
if test "x$BUILD_UEFI_X86_64" = "xno"; then
|
if test "x$BUILD_UEFI_X86_64" = "xno"; then
|
||||||
BUILD_UEFI_X86_64=""
|
BUILD_UEFI_X86_64=""
|
||||||
@ -152,8 +152,8 @@ AC_SUBST([BUILD_UEFI_X86_64])
|
|||||||
BUILD_UEFI_AARCH64="$BUILD_ALL"
|
BUILD_UEFI_AARCH64="$BUILD_ALL"
|
||||||
|
|
||||||
AC_ARG_ENABLE([uefi-aarch64],
|
AC_ARG_ENABLE([uefi-aarch64],
|
||||||
AS_HELP_STRING([--enable-uefi-aarch64], [enable building the aarch64 UEFI port]),
|
[AS_HELP_STRING([--enable-uefi-aarch64], [enable building the aarch64 UEFI port])],
|
||||||
BUILD_UEFI_AARCH64="$enableval")
|
[BUILD_UEFI_AARCH64="$enableval"])
|
||||||
|
|
||||||
if test "x$BUILD_UEFI_AARCH64" = "xno"; then
|
if test "x$BUILD_UEFI_AARCH64" = "xno"; then
|
||||||
BUILD_UEFI_AARCH64=""
|
BUILD_UEFI_AARCH64=""
|
||||||
@ -171,8 +171,8 @@ AC_SUBST([BUILD_UEFI_AARCH64])
|
|||||||
BUILD_CD_EFI="$BUILD_ALL"
|
BUILD_CD_EFI="$BUILD_ALL"
|
||||||
|
|
||||||
AC_ARG_ENABLE([uefi-cd],
|
AC_ARG_ENABLE([uefi-cd],
|
||||||
AS_HELP_STRING([--enable-uefi-cd], [enable building limine-cd-efi.bin]),
|
[AS_HELP_STRING([--enable-uefi-cd], [enable building limine-cd-efi.bin])],
|
||||||
BUILD_CD_EFI="$enableval")
|
[BUILD_CD_EFI="$enableval"])
|
||||||
|
|
||||||
if ! test "x$BUILD_CD_EFI" = "xno"; then
|
if ! test "x$BUILD_CD_EFI" = "xno"; then
|
||||||
AC_CHECK_PROG([MTOOLS_FOUND], [mcopy], [yes])
|
AC_CHECK_PROG([MTOOLS_FOUND], [mcopy], [yes])
|
||||||
@ -211,6 +211,9 @@ AC_ARG_VAR([CROSS_READELF], [readelf command for Limine])
|
|||||||
m4_define([DEFAULT_CROSS_CFLAGS], [-g -O2 -pipe -Wall -Wextra])
|
m4_define([DEFAULT_CROSS_CFLAGS], [-g -O2 -pipe -Wall -Wextra])
|
||||||
AC_ARG_VAR([CROSS_CFLAGS], [C flags for Limine @<:@default: ]DEFAULT_CROSS_CFLAGS[@:>@])
|
AC_ARG_VAR([CROSS_CFLAGS], [C flags for Limine @<:@default: ]DEFAULT_CROSS_CFLAGS[@:>@])
|
||||||
test "x$CROSS_CFLAGS" = "x" && CROSS_CFLAGS="DEFAULT_CROSS_CFLAGS"
|
test "x$CROSS_CFLAGS" = "x" && CROSS_CFLAGS="DEFAULT_CROSS_CFLAGS"
|
||||||
|
if test "$werror_state" = "yes"; then
|
||||||
|
CROSS_CFLAGS="$CROSS_CFLAGS -Werror"
|
||||||
|
fi
|
||||||
|
|
||||||
m4_define([DEFAULT_CROSS_LDFLAGS], [])
|
m4_define([DEFAULT_CROSS_LDFLAGS], [])
|
||||||
AC_ARG_VAR([CROSS_LDFLAGS], [Linker flags for Limine @<:@default: ]DEFAULT_CROSS_LDFLAGS[@:>@])
|
AC_ARG_VAR([CROSS_LDFLAGS], [Linker flags for Limine @<:@default: ]DEFAULT_CROSS_LDFLAGS[@:>@])
|
||||||
|
@ -32,7 +32,6 @@ override CROSS_CFLAGS += \
|
|||||||
-mno-80387 \
|
-mno-80387 \
|
||||||
-Wshadow \
|
-Wshadow \
|
||||||
-Wvla \
|
-Wvla \
|
||||||
$(WERROR) \
|
|
||||||
-MMD \
|
-MMD \
|
||||||
-I../freestanding-headers \
|
-I../freestanding-headers \
|
||||||
-I'$(call SHESCAPE,$(BUILDDIR))/tinf' \
|
-I'$(call SHESCAPE,$(BUILDDIR))/tinf' \
|
||||||
|
Loading…
Reference in New Issue
Block a user