<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style="--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style="font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";">
<div class="content">
<p class="details" style="font-style: italic; color: #626168;">
<a href="https://gitlab.rtems.org/matteo.concas">Matteo Concas</a> created an issue: <a href="https://gitlab.rtems.org/rtems/tools/rtems_waf/-/issues/7">#7</a>
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<h2 id="user-content-summary" dir="auto" style="margin-top: 0; margin-bottom: 10px;" align="initial">Summary<a href="#summary" aria-label="Link to heading 'Summary'" data-heading-content="Summary" class="anchor" style="margin-top: 0;"></a>
</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">This is on GCC 16.1.0:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-canonical-lang="bash" class="code highlight js-syntax-highlight language-shell" v-pre="true" style="display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;"><code style="font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;"><span id="LC1" class="line" lang="shell" style="margin-top: 0;"><span class="nv" style="margin-top: 0;">$ </span>sparc-rtems7-gcc <span class="nt">--version</span></span>
<span id="LC2" class="line" lang="shell">sparc-rtems7-gcc <span class="o" style="margin-top: 0;">(</span>GCC<span class="o">)</span> 16.1.0 20260430 <span class="o">(</span>RTEMS 7, RSB b03c726e60e703b4a3d4e265cb8e9badc5235f0a, Newlib a0ccec7e<span class="o">)</span></span>
<span id="LC3" class="line" lang="shell">Copyright <span class="o" style="margin-top: 0;">(</span>C<span class="o">)</span> 2026 Free Software Foundation, Inc.</span>
<span id="LC4" class="line" lang="shell">This is free software<span class="p" style="margin-top: 0;">;</span> see the <span class="nb">source </span><span class="k">for </span>copying conditions. There is NO</span>
<span id="LC5" class="line" lang="shell">warranty<span class="p" style="margin-top: 0;">;</span> not even <span class="k">for </span>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">A valid RTEMS SMP BSP will return "The configuration failed" even though nothing is wrong with the BSP itself.</p>
<h2 id="user-content-steps-to-reproduce" dir="auto" style="margin-top: 20px; margin-bottom: 10px;" align="initial">Steps to reproduce<a href="#steps-to-reproduce" aria-label="Link to heading 'Steps to reproduce'" data-heading-content="Steps to reproduce" class="anchor" style="margin-top: 0;"></a>
</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Pick your favorite BSP in SMP configuration and run the Waf configure step:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-canonical-lang="bash" class="code highlight js-syntax-highlight language-shell" v-pre="true" style="display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;"><code style="font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;"><span id="LC1" class="line" lang="shell" style="margin-top: 0;"><span class="nv" style="margin-top: 0;">$ </span>./waf <span class="nt">-p</span> configure <span class="nt">--prefix</span><span class="o">=</span>/opt/rtems/7 <span class="nt">--rtems-bsps</span><span class="o">=</span>sparc/gr740_smp</span>
<span id="LC2" class="line" lang="shell">Setting top to : /home/matteo/dev/rtems/rtems-libbsd</span>
<span id="LC3" class="line" lang="shell">Setting out to : /home/matteo/dev/rtems/rtems-libbsd/build</span>
<span id="LC4" class="line" lang="shell">RTEMS Version : 7</span>
<span id="LC5" class="line" lang="shell">Architectures : riscv-rtems7, sparc-rtems7</span>
<span id="LC6" class="line" lang="shell">Board Support Package <span class="o" style="margin-top: 0;">(</span>BSP<span class="o">)</span> : sparc-rtems7-gr740_smp</span>
<span id="LC7" class="line" lang="shell">Show commands : no</span>
<span id="LC8" class="line" lang="shell">Long commands : no</span>
<span id="LC9" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-gcc'</span> : /opt/rtems/7/bin/sparc-rtems7-gcc</span>
<span id="LC10" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-g++'</span> : /opt/rtems/7/bin/sparc-rtems7-g++</span>
<span id="LC11" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-gcc'</span> : /opt/rtems/7/bin/sparc-rtems7-gcc</span>
<span id="LC12" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-ld'</span> : /opt/rtems/7/bin/sparc-rtems7-ld</span>
<span id="LC13" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-ar'</span> : /opt/rtems/7/bin/sparc-rtems7-ar</span>
<span id="LC14" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-nm'</span> : /opt/rtems/7/bin/sparc-rtems7-nm</span>
<span id="LC15" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-objdump'</span> : /opt/rtems/7/bin/sparc-rtems7-objdump</span>
<span id="LC16" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-objcopy'</span> : /opt/rtems/7/bin/sparc-rtems7-objcopy</span>
<span id="LC17" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-readelf'</span> : /opt/rtems/7/bin/sparc-rtems7-readelf</span>
<span id="LC18" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-strip'</span> : /opt/rtems/7/bin/sparc-rtems7-strip</span>
<span id="LC19" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'sparc-rtems7-ranlib'</span> : /opt/rtems/7/bin/sparc-rtems7-ranlib</span>
<span id="LC20" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'rtems-ld'</span> : /opt/rtems/7/bin/rtems-ld</span>
<span id="LC21" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'rtems-tld'</span> : /opt/rtems/7/bin/rtems-tld</span>
<span id="LC22" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'rtems-syms'</span> : /opt/rtems/7/bin/rtems-syms</span>
<span id="LC23" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'rtems-bin2c'</span> : /opt/rtems/7/bin/rtems-bin2c</span>
<span id="LC24" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'tar'</span> : /usr/bin/tar</span>
<span id="LC25" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'gcc, cc'</span> : /opt/rtems/7/bin/sparc-rtems7-gcc</span>
<span id="LC26" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'ar'</span> : /opt/rtems/7/bin/sparc-rtems7-ar</span>
<span id="LC27" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'g++, c++'</span> : /opt/rtems/7/bin/sparc-rtems7-g++</span>
<span id="LC28" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'ar'</span> : /opt/rtems/7/bin/sparc-rtems7-ar</span>
<span id="LC29" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'gas, gcc'</span> : /opt/rtems/7/bin/sparc-rtems7-gcc</span>
<span id="LC30" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>program <span class="s1">'ar'</span> : /opt/rtems/7/bin/sparc-rtems7-ar</span>
<span id="LC31" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>c flags <span class="s1">'-MMD'</span> : <span class="nb">yes</span></span>
<span id="LC32" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>cxx flags <span class="s1">'-MMD'</span> : <span class="nb">yes</span></span>
<span id="LC33" class="line" lang="shell">Compiler version <span class="o" style="margin-top: 0;">(</span>sparc-rtems7-gcc<span class="o">)</span> : 16.1.0 20260430 <span class="o">(</span>RTEMS 7, RSB b03c726e60e703b4a3d4e265cb8e9badc5235f0a, Newlib a0ccec7e<span class="o">)</span></span>
<span id="LC34" class="line" lang="shell">Checking <span class="k" style="margin-top: 0;">for </span>a valid RTEMS BSP installation : no</span>
<span id="LC35" class="line" lang="shell">The configuration failed</span>
<span id="LC36" class="line" lang="shell"><span class="o" style="margin-top: 0;">(</span><span class="nb">complete </span>log <span class="k">in</span> /home/matteo/dev/rtems/rtems-libbsd/build/config.log<span class="o">)</span></span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">The checks fail when we try to compile and link a minimal RTEMS application:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-canonical-lang="log" class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style="display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;"><code style="font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;"><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">-------------------------------------------</span>
<span id="LC2" class="line" lang="plaintext">Checking for a valid RTEMS BSP installation</span>
<span id="LC3" class="line" lang="plaintext">==></span>
<span id="LC4" class="line" lang="plaintext">#include <rtems.h></span>
<span id="LC5" class="line" lang="plaintext">void Init(rtems_task_argument arg) { (void)arg; }</span>
<span id="LC6" class="line" lang="plaintext">#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER</span>
<span id="LC7" class="line" lang="plaintext">#define CONFIGURE_MAXIMUM_TASKS 1</span>
<span id="LC8" class="line" lang="plaintext">#define CONFIGURE_RTEMS_INIT_TASKS_TABLE</span>
<span id="LC9" class="line" lang="plaintext">#define CONFIGURE_INIT</span>
<span id="LC10" class="line" lang="plaintext">#include <rtems/confdefs.h></span>
<span id="LC11" class="line" lang="plaintext"><==</span>
<span id="LC12" class="line" lang="plaintext">[1/2] Compiling build/.conf_check_f1288dec71125f8a90f82dc0a53c5163/test.c</span>
<span id="LC13" class="line" lang="plaintext"></span>
<span id="LC14" class="line" lang="plaintext">['/opt/rtems/7/bin/sparc-rtems7-gcc', '-mcpu=leon3', '-isystem/opt/rtems/7/sparc-rtems7/gr740_smp/lib/include', '-MMD', '../test.c', '-c', '-o/home/matteo/dev/rtems/rtems-libbsd/build/.conf_check_f1288dec71125f8a90f82dc0a53c5163/testbuild/test.c.1.o']</span>
<span id="LC15" class="line" lang="plaintext">[2/2] Linking build/.conf_check_f1288dec71125f8a90f82dc0a53c5163/testbuild/testprog</span>
<span id="LC16" class="line" lang="plaintext"></span>
<span id="LC17" class="line" lang="plaintext">['/opt/rtems/7/bin/sparc-rtems7-gcc', '-mcpu=leon3', '-isystem/opt/rtems/7/sparc-rtems7/gr740_smp/lib/include', '-MMD', '-mcpu=leon3', '-B/opt/rtems/7/sparc-rtems7/gr740_smp/lib', '-qrtems', '-Wl,--gc-sections', 'test.c.1.o', '-o/home/matteo/dev/rtems/rtems-libbsd/build/.conf_check_f1288dec71125f8a90f82dc0a53c5163/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic']</span>
<span id="LC18" class="line" lang="plaintext">err: /opt/rtems/7/bin/../lib/gcc/sparc-rtems7/16.1.0/../../../../sparc-rtems7/bin/ld: /opt/rtems/7/sparc-rtems7/gr740_smp/lib/start.o: in function `hard_reset':</span>
<span id="LC19" class="line" lang="plaintext">....</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">I won't put the full error trace as I don't think it's very relevant.
Now if I try to run the exact same commands from the terminal I will run into the same errors which is expected.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">To actually get the application to link I need to supply <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">-B/opt/rtems/7/sparc-rtems7/gr740_smp/lib</code> in the compile step and then everything is fine.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">The "dirty" fix for this is to have:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-canonical-lang="diff" class="code highlight js-syntax-highlight language-diff" v-pre="true" style="display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;"><code style="font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;"><span id="LC1" class="line" lang="diff" style="margin-top: 0;"><span class="gh" style="margin-top: 0;">diff --git a/rtems.py b/rtems.py</span></span>
<span id="LC2" class="line" lang="diff"><span class="gh" style="margin-top: 0;">index c35b7d0..981a48b 100644</span></span>
<span id="LC3" class="line" lang="diff"><span class="gd" style="margin-top: 0;">--- a/rtems.py</span></span>
<span id="LC4" class="line" lang="diff"><span class="gi" style="margin-top: 0;">+++ b/rtems.py</span></span>
<span id="LC5" class="line" lang="diff"><span class="p" style="margin-top: 0;">@@ -268,7 +268,7 @@</span> def configure(conf, bsp_configure=None):</span>
<span id="LC6" class="line" lang="diff"> cflags['cxxflags'] = copy.copy(cflags['cflags'])</span>
<span id="LC7" class="line" lang="diff"> cflags['asflags'] = copy.copy(cflags['cflags'])</span>
<span id="LC8" class="line" lang="diff"></span>
<span id="LC9" class="line" lang="diff"><span class="gd" style="margin-top: 0;">- conf.env.CFLAGS = cflags['cflags']</span></span>
<span id="LC10" class="line" lang="diff"><span class="gi" style="margin-top: 0;">+ conf.env.CFLAGS = cflags['cflags'] + ldflags['specs']</span></span>
<span id="LC11" class="line" lang="diff"> conf.env.CXXFLAGS = cflags['cxxflags']</span>
<span id="LC12" class="line" lang="diff"> conf.env.ASFLAGS = cflags['asflags']</span>
<span id="LC13" class="line" lang="diff"> conf.env.WFLAGS = cflags['warnings']</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0;" align="initial">I have only run into this trying to configure rtems-libbsd. I'm quite surprised I haven't seen this earlier.</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
<a href="https://gitlab.rtems.org/rtems/tools/rtems_waf/-/issues/7">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/3-5lzdr4546vxrprwuj0h2mllif/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/rtems/tools/rtems_waf/-/issues/7 at 1778517434
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.rtems.org/rtems/tools/rtems_waf/-/issues/7"}}</script>
</p>
</div>
</body>
</html>