[rtems-source-builder commit] freebsd: Fix GDB building on some 12 and higher versions

Chris Johns chrisj at rtems.org
Thu Jan 23 00:59:10 UTC 2020


Module:    rtems-source-builder
Branch:    master
Commit:    599c4d7c87fab531014a614f2a32b56be0a3ce28
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=599c4d7c87fab531014a614f2a32b56be0a3ce28

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue Jan 21 14:46:16 2020 +1100

freebsd: Fix GDB building on some 12 and higher versions

---

 source-builder/config/gdb-common-1.cfg | 10 ++++++++++
 source-builder/sb/freebsd.py           |  4 +++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg
index 40cba4b..5847f11 100644
--- a/source-builder/config/gdb-common-1.cfg
+++ b/source-builder/config/gdb-common-1.cfg
@@ -192,6 +192,15 @@ URL:       http://www.gnu.org/software/gdb/
 %endif
 
 #
+# Fix the mess iconv is on FreeBSD 10.0 and higher.
+#
+%if %{defined iconv_prefix}
+ %define iconv_opts --with-libiconv-prefix=%{iconv_prefix}
+%else
+ %define iconv_opts %{nil}
+%endif
+
+#
 #
 # Prepare the source code.
 #
@@ -239,6 +248,7 @@ URL:       http://www.gnu.org/software/gdb/
     --without-zlib \
     --with-expat \
     --with-guile=no \
+    %{iconv_opts} \
     %{!?without_python:%{with_python_option}} \
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --exec-prefix=%{_exec_prefix} \
diff --git a/source-builder/sb/freebsd.py b/source-builder/sb/freebsd.py
index 8fc7db1..5497e75 100644
--- a/source-builder/sb/freebsd.py
+++ b/source-builder/sb/freebsd.py
@@ -111,9 +111,11 @@ def load():
         if check.check_exe(cvs, cvs):
             defines['__cvs'] = cvs
         #
-        # Fix the mess iconv is on FreeBSD 10.0.
+        # Fix the mess iconv is on FreeBSD 10.0 and higher.
         #
         defines['iconv_includes'] = ('none', 'none', '%{host_includes} %{host_ldflags}')
+        if fb_version >= 12:
+            defines['iconv_prefix'] = ('none', 'none', '%{_usr}')
 
         #
         # On 11.0+ makeinfo and install-info have moved to /usr/local/...



More information about the vc mailing list