updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / rosbe / build_script.arch.patch
blob8586996c5163d6a2115d343b849dc74253c716fc
1 --- RosBE-Builder.sh 2011-05-26 14:02:33.832258692 +0300
2 +++ RosBE-Builder.sh.no_interact 2011-05-26 14:35:48.454646641 +0300
3 @@ -170,7 +170,7 @@
5 echo "Ready to build and install the ReactOS Build Environment."
6 echo "Press Return to continue or Ctrl+C to exit."
7 - read
9 else
10 installdir=`eval echo $1`
12 @@ -227,16 +227,14 @@
13 rs_mkdir_if_not_exists "$rs_prefixdir/$rs_target"
14 rs_mkdir_if_not_exists "$rs_supportprefixdir"
16 -# Use -march=native if the host compiler supports it
17 -echo -n "Checking if the host compiler supports -march=native... "
18 +# Load the -march setting from makepkg.conf
19 +source /etc/makepkg.conf
20 +for i in `echo $CFLAGS`; do
21 + if `echo "$i" | grep -q "\-march="`; then
22 + rs_host_cflags+=" $i"
23 + fi
24 +done
26 -if `gcc -march=native -o "$rs_workdir/dummy" "$rs_scriptdir/tools/dummy.c" >& /dev/null`; then
27 - echo "yes"
28 - rs_host_cflags+=" -march=native"
29 - rm "$rs_workdir/dummy"
30 -else
31 - echo "no"
32 -fi
34 rs_extract_module "mingw_runtime_dev" "$rs_prefixdir/$rs_target"
35 rs_extract_module "w32api" "$rs_prefixdir/$rs_target"
36 @@ -249,7 +247,17 @@
37 rs_do_command gcc -s -o "$installdir/bin/cpucount" "$rs_scriptdir/tools/cpucount.c"
40 -rs_cpucount=`$installdir/bin/cpucount -x1`
41 +# Load the job thread count from makepkg.conf
42 +# if set, otherwice use cpucount
43 +if [[ "$MAKEFLAGS" == "" ]]; then
44 + rs_cpucount=`$installdir/bin/cpucount -x1`
45 +else
46 + for i in `echo $MAKEFLAGS`; do
47 + if `echo "$i" | grep -q "\-j"`; then
48 + rs_cpucount=`echo "$i" | sed 's|-j||g'`
49 + fi
50 + done
51 +fi
53 if $rs_process_getincludes; then
54 rs_do_command gcc -s -o "$installdir/bin/getincludes" "$rs_scriptdir/tools/getincludes.c"
55 @@ -356,15 +364,4 @@
57 # Finish
58 rs_boldmsg "Finished successfully!"
59 -echo "To create a shortcut to the Build Environment on the Desktop, please switch back to your"
60 -echo "normal User Account (I assume you ran this script as \"root\")."
61 -echo "Then execute the following command:"
62 -echo
63 -echo " $installdir/createshortcut.sh"
64 -echo
65 -echo "If you just want to start the Build Environment without using a shortcut, execute the"
66 -echo "following command:"
67 -echo
68 -echo " $installdir/RosBE.sh [source directory] [color code] [architecture]"
69 -echo
70 -echo "All parameters for that script are optional."