<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems-tools (2011-12-07)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Add FreeBSD support.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-tools/specbuilder/specbuilder/defaults.py.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>specbuilder/specbuilder/defaults.py</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-tools/specbuilder/specbuilder/freebsd.py?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">specbuilder/specbuilder/freebsd.py</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-tools/specbuilder/specbuilder/defaults.py:1.8 rtems-tools/specbuilder/specbuilder/defaults.py:1.9
--- rtems-tools/specbuilder/specbuilder/defaults.py:1.8 Thu Jun 9 00:59:32 2011
+++ rtems-tools/specbuilder/specbuilder/defaults.py Mon Dec 5 05:32:44 2011
</font><font color='#997700'>@@ -430,6 +430,9 @@
</font> if uname[0] == 'Darwin':
import darwin
overrides = darwin.load()
<font color='#000088'>+ elif uname[0] == 'FreeBSD':
+ import freebsd
+ overrides = freebsd.load()
</font> elif uname[0] == 'Linux':
import linux<span style="background-color: #FF0000"> </span>
overrides = linux.load()
<font color='#997700'>@@ -461,6 +464,3 @@
</font> print ierr
sys.exit(1)
sys.exit(0)
<font color='#880000'>-
-
-
</font>
<font color='#006600'>diff -u /dev/null rtems-tools/specbuilder/specbuilder/freebsd.py:1.1
--- /dev/null Wed Dec 7 14:53:23 2011
+++ rtems-tools/specbuilder/specbuilder/freebsd.py Mon Dec 5 05:32:44 2011
</font><font color='#997700'>@@ -0,0 +1,67 @@
</font><font color='#000088'>+#
+# $Id$
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright 2010 Chris Johns (chrisj@rtems.org)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# RTEMS Tools is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# RTEMS Tools is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with RTEMS Tools. If not, see <http://www.gnu.org/licenses/>.
+#
+
+#
+# This code is based on what ever doco about spec files I could find and<span style="background-color: #FF0000"> </span>
+# RTEMS project's spec files.
+#
+
+import pprint
+import os
+
+import execute
+
+def load():
+ uname = os.uname()
+ sysctl = '/sbin/sysctl '
+ e = execute.capture_execution()
+ exit_code, proc, output = e.shell(sysctl + 'hw.ncpu')
+ if exit_code == 0:
+ smp_mflags = '-j' + output.split(' ')[1].strip()
+ else:
+ smp_mflags = ''
+ if uname[4] == 'amd64':
+ cpu = 'x86_64'
+ else:
+ cpu = uname[4]
+ version = uname[2]
+ if version.find('-') > 0:
+ version = version.split('-')[0]
+ defines = {<span style="background-color: #FF0000"> </span>
+ '_os': 'freebsd',
+ '_host': cpu + '-freebsd' + uname[2],
+ '_host_vendor': 'freebsd',
+ '_host_os': 'freebsd',
+ '_host_cpu': cpu,
+ '_host_alias': '%{nil}',
+ '_host_arch': cpu,
+ '_usr': '/usr/local',
+ '_var': '/usr/local/var',
+ 'optflags': '-O2 -fasynchronous-unwind-tables',
+ '_smp_mflags': smp_mflags,
+ '__xz': '/usr/bin/xz',
+ }
+ return defines
+
+if __name__ == '__main__':
+ pprint.pprint(load())
</font></pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Fix the host verison in FreeBSD. Allow the top of the src to crossrpms.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-tools/specbuilder/specbuilder/freebsd.py.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>specbuilder/specbuilder/freebsd.py</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-tools/specbuilder/specbuilder/setup.py.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>specbuilder/specbuilder/setup.py</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-tools/specbuilder/specbuilder/freebsd.py:1.1 rtems-tools/specbuilder/specbuilder/freebsd.py:1.2
--- rtems-tools/specbuilder/specbuilder/freebsd.py:1.1 Mon Dec 5 05:32:44 2011
+++ rtems-tools/specbuilder/specbuilder/freebsd.py Mon Dec 5 14:53:17 2011
</font><font color='#997700'>@@ -49,7 +49,7 @@
</font> version = version.split('-')[0]
defines = {<span style="background-color: #FF0000"> </span>
'_os': 'freebsd',
<font color='#880000'>- '_host': cpu + '-freebsd' + uname[2],
</font><font color='#000088'>+ '_host': cpu + '-freebsd' + version,
</font> '_host_vendor': 'freebsd',
'_host_os': 'freebsd',
'_host_cpu': cpu,
<font color='#997700'>@@ -57,9 +57,10 @@
</font> '_host_arch': cpu,
'_usr': '/usr/local',
'_var': '/usr/local/var',
<font color='#880000'>- 'optflags': '-O2 -fasynchronous-unwind-tables',
</font><font color='#000088'>+ 'optflags': '-O2',
</font> '_smp_mflags': smp_mflags,
'__xz': '/usr/bin/xz',
<font color='#000088'>+ '__make': '/usr/bin/gmake',
</font> }
return defines
<font color='#006600'>diff -u rtems-tools/specbuilder/specbuilder/setup.py:1.6 rtems-tools/specbuilder/specbuilder/setup.py:1.7
--- rtems-tools/specbuilder/specbuilder/setup.py:1.6 Mon Feb 21 21:46:44 2011
+++ rtems-tools/specbuilder/specbuilder/setup.py Mon Dec 5 14:53:17 2011
</font><font color='#997700'>@@ -144,7 +144,9 @@
</font> rtemssrc = os.path.abspath(os.path.expanduser(self.opts.opts['rtems']))
crossrpms = os.path.join(rtemssrc, 'contrib', 'crossrpms')
if not os.path.isdir(crossrpms):
<font color='#880000'>- raise error.general('no crossrpms directory found under: ' + crossrpms)
</font><font color='#000088'>+ crossrpms = os.path.join(rtemssrc)
+ if not os.path.isdir(crossrpms):
+ raise error.general('no crossrpms directory found under: ' + crossrpms)
</font> if self.opts.rebuild():
if self.check_version('autoconf', '%{__setup_autoconf}'):
self.run('../../bootstrap -c', '-c', crossrpms)
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Add a hack to work around make not being a macro in the spec files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-tools/specbuilder/specbuilder/defaults.py.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>specbuilder/specbuilder/defaults.py</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-tools/specbuilder/specbuilder/freebsd.py.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>specbuilder/specbuilder/freebsd.py</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-tools/specbuilder/specbuilder/defaults.py:1.9 rtems-tools/specbuilder/specbuilder/defaults.py:1.10
--- rtems-tools/specbuilder/specbuilder/defaults.py:1.9 Mon Dec 5 05:32:44 2011
+++ rtems-tools/specbuilder/specbuilder/defaults.py Tue Dec 6 00:37:54 2011
</font><font color='#997700'>@@ -82,6 +82,8 @@
</font> export LANG
unset DISPLAY || :
umask 022
<font color='#000088'>+# hack around make not being a macro and hard code in spec files
+alias make=%{__make}
</font> cd "%{_builddir}"''',
'___build_shell': '%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}',
'___build_template': '''#!%{___build_shell}
<font color='#997700'>@@ -117,7 +119,7 @@
</font> '__ld': '/usr/bin/ld',
'__ldconfig': '/sbin/ldconfig',
'__ln_s': 'ln -s',
<font color='#880000'>-'__make': '/usr/bin/make',
</font><font color='#000088'>+'__make': 'make',
</font> '__mkdir': '/bin/mkdir',
'__mkdir_p': '/bin/mkdir -p',
'__mv': '/bin/mv',
<font color='#006600'>diff -u rtems-tools/specbuilder/specbuilder/freebsd.py:1.2 rtems-tools/specbuilder/specbuilder/freebsd.py:1.3
--- rtems-tools/specbuilder/specbuilder/freebsd.py:1.2 Mon Dec 5 14:53:17 2011
+++ rtems-tools/specbuilder/specbuilder/freebsd.py Tue Dec 6 00:37:57 2011
</font><font color='#997700'>@@ -50,7 +50,7 @@
</font> defines = {<span style="background-color: #FF0000"> </span>
'_os': 'freebsd',
'_host': cpu + '-freebsd' + version,
<font color='#880000'>- '_host_vendor': 'freebsd',
</font><font color='#000088'>+ '_host_vendor': 'pc',
</font> '_host_os': 'freebsd',
'_host_cpu': cpu,
'_host_alias': '%{nil}',
<font color='#997700'>@@ -60,7 +60,7 @@
</font> 'optflags': '-O2',
'_smp_mflags': smp_mflags,
'__xz': '/usr/bin/xz',
<font color='#880000'>- '__make': '/usr/bin/gmake',
</font><font color='#000088'>+ '__make': 'gmake',
</font> }
return defines
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Add /usr/local to the host cflags on FreeBSD.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-tools/specbuilder/specbuilder/freebsd.py.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>specbuilder/specbuilder/freebsd.py</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-tools/specbuilder/specbuilder/freebsd.py:1.3 rtems-tools/specbuilder/specbuilder/freebsd.py:1.4
--- rtems-tools/specbuilder/specbuilder/freebsd.py:1.3 Tue Dec 6 00:37:57 2011
+++ rtems-tools/specbuilder/specbuilder/freebsd.py Tue Dec 6 17:44:37 2011
</font><font color='#997700'>@@ -57,7 +57,7 @@
</font> '_host_arch': cpu,
'_usr': '/usr/local',
'_var': '/usr/local/var',
<font color='#880000'>- 'optflags': '-O2',
</font><font color='#000088'>+ 'optflags': '-O2 -I/usr/local/include -L/usr/local/lib',
</font> '_smp_mflags': smp_mflags,
'__xz': '/usr/bin/xz',
'__make': 'gmake',
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>