1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- # Build script for qi.
- #
- # Copyright (c) 2015-2018 Matias Fonzo, <selk@dragora.org>.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- echo "Making Qi from ${CWD}/qi ..."
- cd -- "${CWD}/qi"
- make -j1 clean
- ./configure --prefix=/tools
- make -j1
- make -j1 install
- # Clean up the source repository
- rm -f config.mak
- make -j1 clean
- # Copy our custom qirc to /tools
- cp -p "${worktree}/archive/qi/qirc" /tools/etc/
- chmod 644 /tools/etc/qirc
- # Set compiler options provided by default in Dragora
- case $arch in
- i586)
- sed -i \
- -e 's|#QICFLAGS=.*|QICFLAGS=-g0 -Os -march=i586 -mtune=i686|' \
- -e 's|#QICXXFLAGS=.*|QICXXFLAGS=-g0 -Os -march=i586 -mtune=i686|' \
- /tools/etc/qirc
- ;;
- x86_64)
- sed -i \
- -e 's|#QICFLAGS=.*|QICFLAGS=-g0 -Os -mtune=generic|' \
- -e 's|#QICXXFLAGS=.*|QICXXFLAGS=-g0 -Os -mtune=generic|' \
- /tools/etc/qirc
- ;;
- esac
- # Include additional settings from targets/
- # We prefix '--enable-multilib' for targets supporting it,
- # the native GCC wants this option explicitly
- if test -n "$multilib_options"
- then
- case $multilib_options in
- *--disable-multilib* | *--enable-multilib*)
- true
- ;;
- *)
- multilib_options="--enable-multilib $multilib_options"
- ;;
- esac
- fi
- cat << EOF >> /tools/etc/qirc
- # Multilib options
- multilib_options=$multilib_options
- # lib<equal> suffix (multilib, if any)
- libSuffix=$libSuffix
- # GCC (arch-specific) options
- gcc_options=$gcc_options
- EOF
|