public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Add SPARC RTEMS specific file
@ 2011-01-22  3:06 Ian Lance Taylor
  2011-01-22 10:18 ` Ralf Wildenhues
  2011-01-24  0:03 ` [gofrontend-dev] " Joel Sherrill
  0 siblings, 2 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-01-22  3:06 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

This trivial libgo patch adds a file to hold SPARC RTEMS specific
information to the syscalls subdirectory.  There is nothing in there at
present.  If anybody knows of a simple way to use automake with files
that may or may not exist, please let me know.  I'd prefer to avoid
configure tests since they separate the test and the use in a way that I
find hard to maintain over time.  Anyhow, bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sparc --]
[-- Type: text/x-diff, Size: 492 bytes --]

Index: libgo/syscalls/syscall_rtems_sparc.go
===================================================================
--- libgo/syscalls/syscall_rtems_sparc.go	(revision 0)
+++ libgo/syscalls/syscall_rtems_sparc.go	(revision 0)
@@ -0,0 +1,7 @@
+// syscall_rtems_sparc.go -- RTEMS SPARC specific syscall interface.
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package syscall

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

* Re: libgo patch committed: Add SPARC RTEMS specific file
  2011-01-22  3:06 libgo patch committed: Add SPARC RTEMS specific file Ian Lance Taylor
@ 2011-01-22 10:18 ` Ralf Wildenhues
  2011-01-23 10:35   ` Ian Lance Taylor
  2011-01-24  0:03 ` [gofrontend-dev] " Joel Sherrill
  1 sibling, 1 reply; 8+ messages in thread
From: Ralf Wildenhues @ 2011-01-22 10:18 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

* Ian Lance Taylor wrote on Sat, Jan 22, 2011 at 03:01:40AM CET:
> If anybody knows of a simple way to use automake with files
> that may or may not exist, please let me know.  I'd prefer to avoid
> configure tests since they separate the test and the use in a way that I
> find hard to maintain over time.

Hmm, you can

if COND
foo_SOURCES += bar.go
endif

or you can

foo_SOURCES = $(computed)
EXTRA_foo_SOURCES = bar1.go bar2.go bar3.go

where $(computed) must come from the second set.

If you want to use only Posix make, then you need to have at least some
bit of computation at configure time for this.

Hope that helps.

Cheers,
Ralf

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

* Re: libgo patch committed: Add SPARC RTEMS specific file
  2011-01-22 10:18 ` Ralf Wildenhues
@ 2011-01-23 10:35   ` Ian Lance Taylor
  2011-01-23 11:27     ` Ian Lance Taylor
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-01-23 10:35 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: gcc-patches, gofrontend-dev

Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> * Ian Lance Taylor wrote on Sat, Jan 22, 2011 at 03:01:40AM CET:
>> If anybody knows of a simple way to use automake with files
>> that may or may not exist, please let me know.  I'd prefer to avoid
>> configure tests since they separate the test and the use in a way that I
>> find hard to maintain over time.
>
> Hmm, you can
>
> if COND
> foo_SOURCES += bar.go
> endif
>
> or you can
>
> foo_SOURCES = $(computed)
> EXTRA_foo_SOURCES = bar1.go bar2.go bar3.go
>
> where $(computed) must come from the second set.
>
> If you want to use only Posix make, then you need to have at least some
> bit of computation at configure time for this.

Thanks, I know about those possibilities, but they aren't what I want,
because they require me to determine whether the files exist in the
configure script and to then use that determination in the Makefile.  I
don't want to split things up that way.  I want to say something like

foo_SOURCES = `test -f f.c && echo f.c`

Ian

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

* Re: libgo patch committed: Add SPARC RTEMS specific file
  2011-01-23 10:35   ` Ian Lance Taylor
@ 2011-01-23 11:27     ` Ian Lance Taylor
  2011-01-23 12:52     ` Ian Lance Taylor
  2011-01-23 13:29     ` Ralf Wildenhues
  2 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-01-23 11:27 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: gcc-patches, gofrontend-dev

Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> * Ian Lance Taylor wrote on Sat, Jan 22, 2011 at 03:01:40AM CET:
>> If anybody knows of a simple way to use automake with files
>> that may or may not exist, please let me know.  I'd prefer to avoid
>> configure tests since they separate the test and the use in a way that I
>> find hard to maintain over time.
>
> Hmm, you can
>
> if COND
> foo_SOURCES += bar.go
> endif
>
> or you can
>
> foo_SOURCES = $(computed)
> EXTRA_foo_SOURCES = bar1.go bar2.go bar3.go
>
> where $(computed) must come from the second set.
>
> If you want to use only Posix make, then you need to have at least some
> bit of computation at configure time for this.

Thanks, I know about those possibilities, but they aren't what I want,
because they require me to determine whether the files exist in the
configure script and to then use that determination in the Makefile.  I
don't want to split things up that way.  I want to say something like

foo_SOURCES = `test -f f.c && echo f.c`

Ian

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

* Re: libgo patch committed: Add SPARC RTEMS specific file
  2011-01-23 10:35   ` Ian Lance Taylor
  2011-01-23 11:27     ` Ian Lance Taylor
@ 2011-01-23 12:52     ` Ian Lance Taylor
  2011-01-23 13:29     ` Ralf Wildenhues
  2 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-01-23 12:52 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: gcc-patches, gofrontend-dev

Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> * Ian Lance Taylor wrote on Sat, Jan 22, 2011 at 03:01:40AM CET:
>> If anybody knows of a simple way to use automake with files
>> that may or may not exist, please let me know.  I'd prefer to avoid
>> configure tests since they separate the test and the use in a way that I
>> find hard to maintain over time.
>
> Hmm, you can
>
> if COND
> foo_SOURCES += bar.go
> endif
>
> or you can
>
> foo_SOURCES = $(computed)
> EXTRA_foo_SOURCES = bar1.go bar2.go bar3.go
>
> where $(computed) must come from the second set.
>
> If you want to use only Posix make, then you need to have at least some
> bit of computation at configure time for this.

Thanks, I know about those possibilities, but they aren't what I want,
because they require me to determine whether the files exist in the
configure script and to then use that determination in the Makefile.  I
don't want to split things up that way.  I want to say something like

foo_SOURCES = `test -f f.c && echo f.c`

Ian

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

* Re: libgo patch committed: Add SPARC RTEMS specific file
  2011-01-23 10:35   ` Ian Lance Taylor
  2011-01-23 11:27     ` Ian Lance Taylor
  2011-01-23 12:52     ` Ian Lance Taylor
@ 2011-01-23 13:29     ` Ralf Wildenhues
  2 siblings, 0 replies; 8+ messages in thread
From: Ralf Wildenhues @ 2011-01-23 13:29 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

* Ian Lance Taylor wrote on Sun, Jan 23, 2011 at 06:23:35AM CET:
> Ralf Wildenhues writes:
> > * Ian Lance Taylor wrote on Sat, Jan 22, 2011 at 03:01:40AM CET:
> >> If anybody knows of a simple way to use automake with files
> >> that may or may not exist, please let me know.  I'd prefer to avoid
> >> configure tests since they separate the test and the use in a way that I
> >> find hard to maintain over time.

> > if COND
> > foo_SOURCES += bar.go
> > endif
> >
> > or you can
> >
> > foo_SOURCES = $(computed)
> > EXTRA_foo_SOURCES = bar1.go bar2.go bar3.go

> Thanks, I know about those possibilities, but they aren't what I want,
> because they require me to determine whether the files exist in the
> configure script and to then use that determination in the Makefile.  I
> don't want to split things up that way.  I want to say something like
> 
> foo_SOURCES = `test -f f.c && echo f.c`

That doesn't work with the current dependency tracking machinery; it
needs to know the list of files at automake time in order to include
the relevant .Po and .Plo files in the Makefile.

This is something we may be able to address once we have machinery in
place to emit GNU make-specific code, and this Makefile is required to
work with GNU make only.

Sorry,
Ralf

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

* Re: [gofrontend-dev] libgo patch committed: Add SPARC RTEMS specific file
  2011-01-22  3:06 libgo patch committed: Add SPARC RTEMS specific file Ian Lance Taylor
  2011-01-22 10:18 ` Ralf Wildenhues
@ 2011-01-24  0:03 ` Joel Sherrill
  2011-01-24 20:43   ` Ian Lance Taylor
  1 sibling, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2011-01-24  0:03 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

On Fri, Jan 21, 2011 at 8:01 PM, Ian Lance Taylor <iant@google.com> wrote:
> This trivial libgo patch adds a file to hold SPARC RTEMS specific
> information to the syscalls subdirectory.  There is nothing in there at
> present.  If anybody knows of a simple way to use automake with files
> that may or may not exist, please let me know.  I'd prefer to avoid
> configure tests since they separate the test and the use in a way that I
> find hard to maintain over time.  Anyhow, bootstrapped and ran Go
> testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Out of curiosity, why is there a need for architecture specific
Go syscalls for RTEMS?  We use newlib and are a link-in library
OS.  RTEMS doesn't have a trap interface.  We have avoided
architecture  specific files in the Ada run-time.

All the ones that exist now are empty and I would expect that
to continue through the dozen or so architectures RTEMS supports.

--joel

> Ian
>
>

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

* Re: [gofrontend-dev] libgo patch committed: Add SPARC RTEMS specific file
  2011-01-24  0:03 ` [gofrontend-dev] " Joel Sherrill
@ 2011-01-24 20:43   ` Ian Lance Taylor
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-01-24 20:43 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: gcc-patches, gofrontend-dev

Joel Sherrill <joel.sherrill@gmail.com> writes:

> On Fri, Jan 21, 2011 at 8:01 PM, Ian Lance Taylor <iant@google.com> wrote:
>> This trivial libgo patch adds a file to hold SPARC RTEMS specific
>> information to the syscalls subdirectory.  There is nothing in there at
>> present.  If anybody knows of a simple way to use automake with files
>> that may or may not exist, please let me know.  I'd prefer to avoid
>> configure tests since they separate the test and the use in a way that I
>> find hard to maintain over time.  Anyhow, bootstrapped and ran Go
>> testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.
>
> Out of curiosity, why is there a need for architecture specific
> Go syscalls for RTEMS?  We use newlib and are a link-in library
> OS.  RTEMS doesn't have a trap interface.  We have avoided
> architecture  specific files in the Ada run-time.
>
> All the ones that exist now are empty and I would expect that
> to continue through the dozen or so architectures RTEMS supports.

Yes, for RTEMS, right now, I agree.  The problem is that for some CPU/OS
combinations, there does need to be some specific support, e.g.,
syscall_linux_386.go.  So it would be nice to have a clean and simple
way to determine, in the Makefile, whether there is a CPU/OS specific
file that needs to be built.

I guess I should give up and do the test in libgo/configure.ac.

Ian

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

end of thread, other threads:[~2011-01-24 19:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22  3:06 libgo patch committed: Add SPARC RTEMS specific file Ian Lance Taylor
2011-01-22 10:18 ` Ralf Wildenhues
2011-01-23 10:35   ` Ian Lance Taylor
2011-01-23 11:27     ` Ian Lance Taylor
2011-01-23 12:52     ` Ian Lance Taylor
2011-01-23 13:29     ` Ralf Wildenhues
2011-01-24  0:03 ` [gofrontend-dev] " Joel Sherrill
2011-01-24 20:43   ` Ian Lance Taylor

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).