public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* For GCC, newlib combined tree, newlib build-tree testing, use standard search paths
@ 2023-04-14 20:03 Thomas Schwinge
  2023-05-08 19:50 ` Thomas Schwinge
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Schwinge @ 2023-04-14 20:03 UTC (permalink / raw)
  To: newlib; +Cc: gcc-patches, gcc

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

Hi!

OK to push to newlib main branch the attached
"For GCC, newlib combined tree, newlib build-tree testing, use standard search paths"
-- or is something else wrong here, or should this be done differently?
(I mean, I'm confused why this doesn't just work; I'm certainly not the
first person to be testing such a setup?)

I'm not doing anything special here: just symlink 'newlib' into the GCC
source directory, build the combined tree, and then run 'make check', as
mentioned in the attached Git commit log.


Grüße
 Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-For-GCC-newlib-combined-tree-newlib-build-tree-testi.patch --]
[-- Type: text/x-diff, Size: 1749 bytes --]

From e56b38625929c3cf62c71d3fbd9264aaeef39d0c Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 14 Apr 2023 21:26:32 +0200
Subject: [PATCH] For GCC, newlib combined tree, newlib build-tree testing, use
 standard search paths

For example, for GCC/GCN target (AMD GPUs), target libraries are built
individually per supported hardware ISA ('-march=[...]').  Testing such a
toolchain via, for example:

    $ make RUNTESTFLAGS='--target_board=[...]/-march=gfx90a' check[...]

... does work fine for all 'check-gcc-[...]' as well as GCC-provided target
libraries, 'check-target-[...]'.  Just for 'check-target-newlib', for the
example above, not the '-march=gfx90a' newlib libraries are linked in, but
instead always the default ones, which results in link FAILure.  This is cured
simply by skipping use of 'newlib/testsuite/lib/flags.exp', so that the
standard search paths as determined by GCC, DejaGnu are used for newlib, too.
---
 newlib/testsuite/lib/flags.exp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/newlib/testsuite/lib/flags.exp b/newlib/testsuite/lib/flags.exp
index e1e9acb18..697291e7a 100644
--- a/newlib/testsuite/lib/flags.exp
+++ b/newlib/testsuite/lib/flags.exp
@@ -4,6 +4,13 @@
 # is freely granted, provided that this notice is preserved.
 #
 
+if [info exists env(XGCC_FLAGS_FOR_TARGET)] {
+    verbose "GCC, newlib combined tree, build-tree testing; using standard search paths"
+    # ... instead of the search paths built here, based on 'objdir' as set in
+    # newlib's 'site.exp', which always points to the default multilib.
+    return
+}
+
 # flags.exp: overrides the dejagnu versions of libgloss_link_flags,
 # newlib_link_flags, and newlib_include_flags.
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: For GCC, newlib combined tree, newlib build-tree testing, use standard search paths
  2023-04-14 20:03 For GCC, newlib combined tree, newlib build-tree testing, use standard search paths Thomas Schwinge
@ 2023-05-08 19:50 ` Thomas Schwinge
  2023-05-15  8:01   ` Thomas Schwinge
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Schwinge @ 2023-05-08 19:50 UTC (permalink / raw)
  To: newlib; +Cc: gcc-patches, gcc

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

Hi!

Ping: OK to push to newlib main branch the attached
"For GCC, newlib combined tree, newlib build-tree testing, use standard search paths"?
Or, has anybody got adverse comments/insight into this?


Grüße
 Thomas


On 2023-04-14T22:03:28+0200, I wrote:
> Hi!
>
> OK to push to newlib main branch the attached
> "For GCC, newlib combined tree, newlib build-tree testing, use standard search paths"
> -- or is something else wrong here, or should this be done differently?
> (I mean, I'm confused why this doesn't just work; I'm certainly not the
> first person to be testing such a setup?)
>
> I'm not doing anything special here: just symlink 'newlib' into the GCC
> source directory, build the combined tree, and then run 'make check', as
> mentioned in the attached Git commit log.
>
>
> Grüße
>  Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-For-GCC-newlib-combined-tree-newlib-build-tree-testi.patch --]
[-- Type: text/x-diff, Size: 1749 bytes --]

From e56b38625929c3cf62c71d3fbd9264aaeef39d0c Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 14 Apr 2023 21:26:32 +0200
Subject: [PATCH] For GCC, newlib combined tree, newlib build-tree testing, use
 standard search paths

For example, for GCC/GCN target (AMD GPUs), target libraries are built
individually per supported hardware ISA ('-march=[...]').  Testing such a
toolchain via, for example:

    $ make RUNTESTFLAGS='--target_board=[...]/-march=gfx90a' check[...]

... does work fine for all 'check-gcc-[...]' as well as GCC-provided target
libraries, 'check-target-[...]'.  Just for 'check-target-newlib', for the
example above, not the '-march=gfx90a' newlib libraries are linked in, but
instead always the default ones, which results in link FAILure.  This is cured
simply by skipping use of 'newlib/testsuite/lib/flags.exp', so that the
standard search paths as determined by GCC, DejaGnu are used for newlib, too.
---
 newlib/testsuite/lib/flags.exp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/newlib/testsuite/lib/flags.exp b/newlib/testsuite/lib/flags.exp
index e1e9acb18..697291e7a 100644
--- a/newlib/testsuite/lib/flags.exp
+++ b/newlib/testsuite/lib/flags.exp
@@ -4,6 +4,13 @@
 # is freely granted, provided that this notice is preserved.
 #
 
+if [info exists env(XGCC_FLAGS_FOR_TARGET)] {
+    verbose "GCC, newlib combined tree, build-tree testing; using standard search paths"
+    # ... instead of the search paths built here, based on 'objdir' as set in
+    # newlib's 'site.exp', which always points to the default multilib.
+    return
+}
+
 # flags.exp: overrides the dejagnu versions of libgloss_link_flags,
 # newlib_link_flags, and newlib_include_flags.
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: For GCC, newlib combined tree, newlib build-tree testing, use standard search paths
  2023-05-08 19:50 ` Thomas Schwinge
@ 2023-05-15  8:01   ` Thomas Schwinge
  2023-05-15 16:04     ` Jeff Johnston
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Schwinge @ 2023-05-15  8:01 UTC (permalink / raw)
  To: newlib; +Cc: gcc-patches, gcc

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

Hi!

On 2023-05-08T21:50:56+0200, I wrote:
> Ping: OK to push to newlib main branch the attached
> "For GCC, newlib combined tree, newlib build-tree testing, use standard search paths"?
> Or, has anybody got adverse comments/insight into this?

Given that nobody has any comments, I'll push this later this week.
(..., and be available to address any issue this, unlikely, may cause.)


Grüße
 Thomas


> On 2023-04-14T22:03:28+0200, I wrote:
>> Hi!
>>
>> OK to push to newlib main branch the attached
>> "For GCC, newlib combined tree, newlib build-tree testing, use standard search paths"
>> -- or is something else wrong here, or should this be done differently?
>> (I mean, I'm confused why this doesn't just work; I'm certainly not the
>> first person to be testing such a setup?)
>>
>> I'm not doing anything special here: just symlink 'newlib' into the GCC
>> source directory, build the combined tree, and then run 'make check', as
>> mentioned in the attached Git commit log.
>>
>>
>> Grüße
>>  Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-For-GCC-newlib-combined-tree-newlib-build-tree-testi.patch --]
[-- Type: text/x-diff, Size: 1749 bytes --]

From e56b38625929c3cf62c71d3fbd9264aaeef39d0c Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 14 Apr 2023 21:26:32 +0200
Subject: [PATCH] For GCC, newlib combined tree, newlib build-tree testing, use
 standard search paths

For example, for GCC/GCN target (AMD GPUs), target libraries are built
individually per supported hardware ISA ('-march=[...]').  Testing such a
toolchain via, for example:

    $ make RUNTESTFLAGS='--target_board=[...]/-march=gfx90a' check[...]

... does work fine for all 'check-gcc-[...]' as well as GCC-provided target
libraries, 'check-target-[...]'.  Just for 'check-target-newlib', for the
example above, not the '-march=gfx90a' newlib libraries are linked in, but
instead always the default ones, which results in link FAILure.  This is cured
simply by skipping use of 'newlib/testsuite/lib/flags.exp', so that the
standard search paths as determined by GCC, DejaGnu are used for newlib, too.
---
 newlib/testsuite/lib/flags.exp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/newlib/testsuite/lib/flags.exp b/newlib/testsuite/lib/flags.exp
index e1e9acb18..697291e7a 100644
--- a/newlib/testsuite/lib/flags.exp
+++ b/newlib/testsuite/lib/flags.exp
@@ -4,6 +4,13 @@
 # is freely granted, provided that this notice is preserved.
 #
 
+if [info exists env(XGCC_FLAGS_FOR_TARGET)] {
+    verbose "GCC, newlib combined tree, build-tree testing; using standard search paths"
+    # ... instead of the search paths built here, based on 'objdir' as set in
+    # newlib's 'site.exp', which always points to the default multilib.
+    return
+}
+
 # flags.exp: overrides the dejagnu versions of libgloss_link_flags,
 # newlib_link_flags, and newlib_include_flags.
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: For GCC, newlib combined tree, newlib build-tree testing, use standard search paths
  2023-05-15  8:01   ` Thomas Schwinge
@ 2023-05-15 16:04     ` Jeff Johnston
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Johnston @ 2023-05-15 16:04 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: newlib, gcc-patches, gcc

[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]

Sounds fine Thomas.  Thanks.

-- Jeff J.

On Mon, May 15, 2023 at 4:01 AM Thomas Schwinge <thomas@codesourcery.com>
wrote:

> Hi!
>
> On 2023-05-08T21:50:56+0200, I wrote:
> > Ping: OK to push to newlib main branch the attached
> > "For GCC, newlib combined tree, newlib build-tree testing, use standard
> search paths"?
> > Or, has anybody got adverse comments/insight into this?
>
> Given that nobody has any comments, I'll push this later this week.
> (..., and be available to address any issue this, unlikely, may cause.)
>
>
> Grüße
>  Thomas
>
>
> > On 2023-04-14T22:03:28+0200, I wrote:
> >> Hi!
> >>
> >> OK to push to newlib main branch the attached
> >> "For GCC, newlib combined tree, newlib build-tree testing, use standard
> search paths"
> >> -- or is something else wrong here, or should this be done differently?
> >> (I mean, I'm confused why this doesn't just work; I'm certainly not the
> >> first person to be testing such a setup?)
> >>
> >> I'm not doing anything special here: just symlink 'newlib' into the GCC
> >> source directory, build the combined tree, and then run 'make check', as
> >> mentioned in the attached Git commit log.
> >>
> >>
> >> Grüße
> >>  Thomas
>
>
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201,
> 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer:
> Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München;
> Registergericht München, HRB 106955
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-15 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14 20:03 For GCC, newlib combined tree, newlib build-tree testing, use standard search paths Thomas Schwinge
2023-05-08 19:50 ` Thomas Schwinge
2023-05-15  8:01   ` Thomas Schwinge
2023-05-15 16:04     ` Jeff Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).