logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

pass1.sh (1010B)


  1. # SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
  2. #
  3. # SPDX-License-Identifier: GPL-3.0-or-later
  4. src_prepare() {
  5. default
  6. # meslibc is insufficient to regenerate src/ctype or src/iconv
  7. # disable everything using a generated header
  8. patch -Np1 -i ../../files/disable_ctype_headers.patch
  9. rm src/ctype/iswalpha.c src/ctype/iswalnum.c src/ctype/iswctype.c \
  10. src/ctype/towctrans.c
  11. rm include/iconv.h src/locale/iconv.c src/locale/iconv_close.c
  12. # tcc does not support complex types
  13. rm -rf src/complex
  14. # Configure fails without this
  15. mkdir -p /dev
  16. }
  17. src_configure() {
  18. CC=tcc ./configure \
  19. --host=i386 \
  20. --disable-shared \
  21. --prefix="${PREFIX}" \
  22. --libdir="${LIBDIR}" \
  23. --includedir="${PREFIX}/include/"
  24. # configure script creates this file
  25. if test -f /dev/null; then
  26. rm /dev/null
  27. fi
  28. }
  29. src_compile() {
  30. make "${MAKEJOBS}" CROSS_COMPILE= AR="tcc -ar" RANLIB=true CFLAGS="-DSYSCALL_NO_TLS"
  31. }