Changeset 16545 in niluje


Ignore:
Timestamp:
Oct 7, 2019, 11:11:19 PM (11 days ago)
Author:
NiLuJe
Message:

Kindle Hacks:

  • X-TC:
    • Let's play with Clang a bit…
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Configs/trunk/Kindle/Misc/x-compile.sh

    r16533 r16545  
    823823                #export LDFLAGS="${LDFLAGS} -static-libgcc"
    824824                #export LDFLAGS="${LDFLAGS} -static-libstdc++"
     825        # And let's try to break some stuff w/ Clang (just the Gentoo ebuild w/ ARM in LLVM_TARGETS for now)
     826        elif [[ "${3}" == "clang" ]] ; then
     827                echo "* With Clang :)"
     828                # Implies bare
     829                # We don't want to pull any of our own libs through pkg-config
     830                unset PKG_CONFIG_DIR
     831                unset PKG_CONFIG_PATH
     832                unset PKG_CONFIG_LIBDIR
     833                # We also don't want to look at or pick up anything from our own custom sysroot, to make sure vendoring works as intended in standalone projects
     834                export CPPFLAGS="${CPPFLAGS/-isystem${TC_BUILD_DIR}\/include/}"
     835                export LDFLAGS="${LDFLAGS/-L${TC_BUILD_DIR}\/lib /}"
     836                # Setup Clang + lld
     837                # We need to tweak LTO flags
     838                export BASE_CFLAGS="${BASE_CFLAGS/-flto=9/-flto}"
     839                export RICE_CFLAGS="${RICE_CFLAGS/-flto=9/-flto}"
     840                export CC="clang"
     841                export CXX="clang++"
     842                # NOTE: The --gcc-toolchain bit is mainly helpful to lld (apparently)
     843                export CFLAGS="--target=${CROSS_TC} --sysroot=$(${CROSS_TC}-gcc -print-sysroot) --gcc-toolchain=${HOME}/x-tools/${CROSS_TC} ${RICE_CFLAGS}"
     844                export CXXFLAGS="--target=${CROSS_TC} --sysroot=$(${CROSS_TC}-gcc -print-sysroot) --gcc-toolchain=${HOME}/x-tools/${CROSS_TC} ${RICE_CFLAGS}"
     845                export LDFLAGS="-fuse-ld=lld ${BASE_LDFLAGS}"
     846                export AR="llvm-arm"
     847                export NM="llvm-nm"
     848                export RANLIB="llvm-ranlib"
    825849        fi
    826850
Note: See TracChangeset for help on using the changeset viewer.