1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

DRY CFLAGS (#85)

This commit is contained in:
Alex Kotov 2022-11-30 18:22:37 +04:00 committed by GitHub
parent 8add17e91c
commit 1507d3ec21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 10 deletions

View file

@ -1,3 +1,7 @@
2022-11-30 Alex Kotov <kotovalexarian@gmail.com>
* configure.ac: Fix CFLAGS setting
2022-11-29 Alex Kotov <kotovalexarian@gmail.com>
* include/kernaux/macro.h: Rename macro "KERNAUX_PACKING_ATTR" to

View file

@ -305,9 +305,9 @@ AS_IF([test "$with_units" = no], [AC_SUBST([comment_line_units], [
# Set build flags #
###################
AC_DEFUN([do_enable_freestanding], [CFLAGS+=' -nostdlib -ffreestanding -fno-pic -fno-stack-protector '])
AC_DEFUN([do_disable_freestanding], [CFLAGS+=' -fpic '])
AS_IF([test "$enable_freestanding" = yes], do_enable_freestanding, do_disable_freestanding)
AS_IF([test "$enable_freestanding" = yes],
[CFLAGS="$CFLAGS -nostdlib -ffreestanding -fno-pic -fno-stack-protector "],
[CFLAGS="$CFLAGS -fpic "])

View file

@ -18,10 +18,3 @@ endif
if ENABLE_WERROR
AM_CFLAGS += -Werror
endif
# TODO: DRY (configure.ac)
if ENABLE_FREESTANDING
AM_CFLAGS += -nostdlib -ffreestanding -fno-pic -fno-stack-protector
else
AM_CFLAGS += -fpic
endif