public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* Fix MIPS sys/syscall.h dependency
@ 2011-12-19 22:13 Joseph S. Myers
  2011-12-22 18:34 ` Joseph S. Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2011-12-19 22:13 UTC (permalink / raw)
  To: libc-ports

sysdeps/unix/sysv/linux/mips/Makefile had a dependency on sys/syscall.h 
(used when building in the "misc" directory) with a relative path that was 
only correct before the move to ports as an add-on.  I've applied this 
patch to locate the file through the sysdeps path instead.  This code 
isn't currently used because the no_syscall_list_h conditionals aren't 
present in libc (see my message to libc-alpha, currently pending 
moderation, for details), but the old dependency path is certainly wrong 
and this fix allows this rule to work if the libc change I've proposed to 
reenable it is applied.  (This change would also still be needed with any 
other approach to allowing triarch targets to define their own versions of 
this rule.)

diff --git a/ChangeLog.mips b/ChangeLog.mips
index abfc2b4..9d79aea 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2011-12-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h
+	$(objpfx)syscall-%.d): Use sysdeps path to locate sys/syscall.h.
+
 2011-11-17  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c,
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 162f1b9..cff3484 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -72,7 +72,7 @@ mips_list_syscalls =	$(filter-out -m%,$(CC)) -E -x c $(+includes) \
 # Here, __NR_N32_open and __NR_O32_open are used to detect case (2)
 # over case (3).  The n64 SYS_* macros can always use the normal
 # ABI-less names.
-$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
+$(objpfx)syscall-%.h $(objpfx)syscall-%.d: $(firstword $(wildcard $(sysdirs:=/sys/syscall.h)))
 	$(make-target-directory)
 	$(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \
 	      -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null

-- 
Joseph S. Myers
joseph@codesourcery.com

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

end of thread, other threads:[~2011-12-22 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-19 22:13 Fix MIPS sys/syscall.h dependency Joseph S. Myers
2011-12-22 18:34 ` Joseph S. Myers

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