mirror of
https://github.com/tailix/libkernaux.git
synced 2025-04-07 17:32:45 -04:00
Main: configure.ac: Add feature "freestanding"
This commit is contained in:
parent
eb3766dc09
commit
12f83b2bcf
9 changed files with 22 additions and 18 deletions
|
@ -1,6 +1,7 @@
|
|||
2022-06-04 Alex Kotov <kotovalexarian@gmail.com>
|
||||
|
||||
* configure.ac: Remove feature "pic"
|
||||
* configure.ac: Add feature "freestanding"
|
||||
|
||||
2022-06-03 Alex Kotov <kotovalexarian@gmail.com>
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ stable options.
|
|||
|
||||
#### Features
|
||||
|
||||
* `--enable-freestanding` - build for freestanding environment
|
||||
* `--enable-tests` - enable usual tests and examples
|
||||
* `--enable-tests-all` - enable all tests
|
||||
* `--enable-tests-python` - enable tests that require Python 3 with YAML and
|
||||
|
@ -163,11 +164,11 @@ without it in `$PATH`:
|
|||
```
|
||||
./configure \
|
||||
--host='i386-elf' \
|
||||
--enable-freestanding \
|
||||
--with-libc-all \
|
||||
AR="$(which i386-elf-ar)" \
|
||||
CC="$(which i386-elf-gcc)" \
|
||||
RANLIB="$(which i386-elf-ranlib)" \
|
||||
CFLAGS='-fno-pic -ffreestanding -nostdlib -fno-stack-protector'
|
||||
RANLIB="$(which i386-elf-ranlib)"
|
||||
```
|
||||
|
||||
You can see the following messages. It's
|
||||
|
|
|
@ -14,6 +14,4 @@ export AR="$CROSS-ar"
|
|||
export CC="$CROSS-gcc"
|
||||
export RANLIB="$CROSS-ranlib"
|
||||
|
||||
export CFLAGS='-fno-pic -ffreestanding -nostdlib -fno-stack-protector'
|
||||
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc-all
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --enable-freestanding --with-libc-all
|
||||
|
|
|
@ -14,6 +14,4 @@ export AR="$CROSS-ar"
|
|||
export CC="$CROSS-gcc"
|
||||
export RANLIB="$CROSS-ranlib"
|
||||
|
||||
export CFLAGS='-fno-pic -ffreestanding -nostdlib -fno-stack-protector'
|
||||
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc-all
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --enable-freestanding --with-libc-all
|
||||
|
|
|
@ -14,6 +14,6 @@ export AR="$CROSS-ar"
|
|||
export CC="$CROSS-gcc"
|
||||
export RANLIB="$CROSS-ranlib"
|
||||
|
||||
export CFLAGS='-fno-pic -ffreestanding -nostdlib -fno-stack-protector -mabi=sysv -mcmodel=kernel -mno-80387 -mno-red-zone'
|
||||
export CFLAGS='-mabi=sysv -mcmodel=kernel -mno-80387 -mno-red-zone'
|
||||
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc-all
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --enable-freestanding --with-libc-all
|
||||
|
|
|
@ -14,6 +14,4 @@ export AR="$TARGET-ar"
|
|||
export CC="$TARGET-gcc"
|
||||
export RANLIB="$TARGET-ranlib"
|
||||
|
||||
export CFLAGS='-fno-pic -ffreestanding -nostdlib -fno-stack-protector'
|
||||
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc-all
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --enable-freestanding --with-libc-all
|
||||
|
|
|
@ -14,6 +14,4 @@ export AR="$TARGET-ar"
|
|||
export CC="$TARGET-gcc"
|
||||
export RANLIB="$TARGET-ranlib"
|
||||
|
||||
export CFLAGS='-fno-pic -ffreestanding -nostdlib -fno-stack-protector'
|
||||
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc-all
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --enable-freestanding --with-libc-all
|
||||
|
|
|
@ -14,6 +14,6 @@ export AR="$TARGET-ar"
|
|||
export CC="$TARGET-gcc"
|
||||
export RANLIB="$TARGET-ranlib"
|
||||
|
||||
export CFLAGS='-fno-pic -ffreestanding -nostdlib -fno-stack-protector -mabi=sysv -mcmodel=kernel -mno-80387 -mno-red-zone'
|
||||
export CFLAGS='-mabi=sysv -mcmodel=kernel -mno-80387 -mno-red-zone'
|
||||
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc-all
|
||||
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --enable-freestanding --with-libc-all
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -23,6 +23,7 @@ AC_ARG_ENABLE([float], AS_HELP_STRING([--disable-float], [disable f
|
|||
AC_ARG_ENABLE([werror], AS_HELP_STRING([--disable-werror], [disable -Werror]))
|
||||
|
||||
dnl Features (disabled by default)
|
||||
AC_ARG_ENABLE([freestanding], AS_HELP_STRING([--enable-freestanding], [build for freestanding environment]))
|
||||
AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests], [enable usual tests and examples]))
|
||||
AC_ARG_ENABLE([tests-all], AS_HELP_STRING([--enable-tests-all], [enable all tests]))
|
||||
AC_ARG_ENABLE([tests-python], AS_HELP_STRING([--enable-tests-python], [enable tests that require Python 3 with YAML and Jinja2]))
|
||||
|
@ -104,6 +105,7 @@ AS_IF([test "$enable_float" = no ], [enable_float=no], [enable_fl
|
|||
AS_IF([test "$enable_werror" = no ], [enable_werror=no], [enable_werror=yes])
|
||||
|
||||
dnl Features (disabled by default)
|
||||
AS_IF([test "$enable_freestanding" = yes], [enable_freestanding=yes], [enable_freestanding=no])
|
||||
AS_IF([test "$enable_tests" = yes], [enable_tests=yes], [enable_tests=no])
|
||||
AS_IF([test "$enable_tests_all" = yes], [enable_tests_all=yes], [enable_tests_all=no])
|
||||
AS_IF([test "$enable_tests_python" = yes], [enable_tests_python=yes], [enable_tests_python=no])
|
||||
|
@ -160,6 +162,7 @@ AM_CONDITIONAL([ENABLE_FLOAT], [test "$enable_float" = yes])
|
|||
AM_CONDITIONAL([ENABLE_WERROR], [test "$enable_werror" = yes])
|
||||
|
||||
dnl Features (disabled by default)
|
||||
AM_CONDITIONAL([ENABLE_FREESTANDING], [test "$enable_freestanding" = yes])
|
||||
AM_CONDITIONAL([ENABLE_TESTS], [test "$enable_tests" = yes])
|
||||
AM_CONDITIONAL([ENABLE_TESTS_PYTHON], [test "$enable_tests_python" = yes])
|
||||
|
||||
|
@ -202,6 +205,7 @@ AS_IF([test "$enable_float" = yes], [AC_DEFINE([ENABLE_FLOAT], [1]
|
|||
AS_IF([test "$enable_werror" = yes], [AC_DEFINE([ENABLE_WERROR], [1], [enabled -Werror])])
|
||||
|
||||
dnl Features (disabled by default)
|
||||
AS_IF([test "$enable_freestanding" = yes], [AC_DEFINE([ENABLE_FREESTANDING], [1], [build for freestanding environment])])
|
||||
AS_IF([test "$enable_tests" = yes], [AC_DEFINE([ENABLE_TESTS], [1], [enabled usual tests and examples])])
|
||||
AS_IF([test "$enable_tests_python" = yes], [AC_DEFINE([ENABLE_TESTS_PYTHON], [1], [enabled tests that require Python 3 with YAML and Jinja2])])
|
||||
|
||||
|
@ -262,6 +266,12 @@ AS_IF([test "$with_libc_strnlen" = no], [AC_SUBST([comment_line_libc_strnlen], [
|
|||
|
||||
|
||||
|
||||
AC_DEFUN([do_disable_freestanding], [CFLAGS+=' -fpic '])
|
||||
AC_DEFUN([do_enable_freestanding], [CFLAGS+=' -nostdlib -ffreestanding -fno-pic -fno-stack-protector '])
|
||||
AS_IF([test "$enable_freestanding" = yes], do_enable_freestanding, do_disable_freestanding)
|
||||
|
||||
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 subdir-objects])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
|
|
Loading…
Add table
Reference in a new issue