3 # Copyright (c) 2015-2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 echo "Making Qi from ${CWD}/qi ..."
25 --packagedir=/usr/pkg \
30 # Clean up the source repository
35 # Copy our custom qirc to /tools
36 cp -p "${worktree}/archive/qi/qirc" /tools/etc/
38 # Set compiler options provided by default in Dragora
42 -e 's|#QICFLAGS=.*|QICFLAGS=-g0 -Os -march=i586 -mtune=i686|' \
43 -e 's|#QICXXFLAGS=.*|QICXXFLAGS=-g0 -Os -march=i586 -mtune=i686|' \
48 -e 's|#QICFLAGS=.*|QICFLAGS=-g0 -Os -mtune=generic -pipe|' \
49 -e 's|#QICXXFLAGS=.*|QICXXFLAGS=-g0 -Os -mtune=generic -pipe|' \
54 -e 's|#QICFLAGS=.*|QICFLAGS=-g0 -Os -pipe|' \
55 -e 's|#QICXXFLAGS=.*|QICXXFLAGS=-g0 -Os -pipe|' \
60 # Include additional settings from targets/
62 # We prefix '--enable-multilib' for targets supporting it,
63 # the native GCC wants this option explicitly
64 if test -n "$multilib_options"
66 case $multilib_options in
67 *--disable-multilib* | *--enable-multilib* | *--with-multilib-list=)
71 multilib_options="--enable-multilib $multilib_options"
76 cat << EOF >> /tools/etc/qirc
79 multilib_options=$multilib_options
81 # lib<equal> suffix (multilib, if any)
84 # GCC (arch-specific) options
85 gcc_options=$gcc_options
88 chmod 644 /tools/etc/qirc