diff mbox

[roland/nptl-sparc] Move remaining SPARC code out of nptl/.

Message ID 20140625012908.949DF2C3A22@topped-with-meat.com
State Committed
Headers show

Commit Message

Roland McGrath June 25, 2014, 1:29 a.m. UTC
> Your roland/nptl branch results in a new build error, the problem is
> that sysdeps/sparc/sparc32/sparcv9/nptl/sem_trywait.c tries to include
> the old location of the generic Linux sem_trywait.c file which of
> course no longer works.
> 
> What's the best way to handle this?  

OK, I think I have the clean way out, though I still haven't actually
tried a sparc compile.  (The known quick and dirty kludge for this
problem is "#include <sysdeps/../nptl/foo.c>".)

I was more conservative than necessary when moving things out of
nptl/sysdeps/.  I moved things from nptl/sysdeps/foo/bar to
sysdeps/foo/bar/nptl pretty formulaically.  But there isn't actually a
need for nptl/ subdirectories all over the place just because we had
the distinction before.  Having more than we really need just makes
for more hair--especially when the final stage of de-add-on-ification
comes and then we'd need sysdeps/unix/sysv/linux/.../Implies files to
list each such foo/bar/nptl.

There should be a sysdeps/.../nptl when it contains things that would
otherwise be picked up by sysdeps/... but should not be.  This is not
the case for pthread_*, sem_*, etc.--everything that is only picked up
at all in the subdir=nptl make stages will not interfere with a
configuration that doesn't build nptl at all.  For sparc, the only
file that actually would interfere is tls.h, so we only need
sysdeps/sparc/nptl/ and the others can be collapsed.  So, we can get
rid of the directories like sparcv9/nptl/ and then they won't foul up
an #include.

I have done an additional change on roland/nptl-sparc to collapse the
unneeded directories, included below for the record (but just use the
git branches).  (Note I've rebased the branches, so you'll need to
force updates.)  I've then rebased roland/nptl to be on top of
roland/nptl-sparc, and fixed the #include's that were affected (there
were one or two others I found by grepping).  So you can just check
out the roland/nptl branch as is and try building.

Let's see how close this gets to working for sparc.


Thanks,
Roland




	* sysdeps/sparc/sparc64/nptl/cpu_relax.S: Moved ...
	* sysdeps/sparc/sparc64/cpu_relax.S: ... here.
	* sysdeps/sparc/sparc64/nptl/pthread_spin_init.c: Moved ...
	* sysdeps/sparc/sparc64/pthread_spin_init.c: ... here.
	* sysdeps/sparc/sparc64/nptl/pthread_spin_lock.S: Moved ...
	* sysdeps/sparc/sparc64/pthread_spin_lock.S: ... here.
	* sysdeps/sparc/sparc64/nptl/pthread_spin_trylock.S: Moved ...
	* sysdeps/sparc/sparc64/pthread_spin_trylock.S: ... here.
	* sysdeps/sparc/sparc64/nptl/pthread_spin_unlock.S: Moved ...
	* sysdeps/sparc/sparc64/pthread_spin_unlock.S: ... here.
	* sysdeps/sparc/sparc64/nptl/pthreaddef.h: Moved ...
	* sysdeps/sparc/sparc64/pthreaddef.h: ... here.
	* sysdeps/sparc/sparc32/sparcv9/cpu_relax.S: Update #include.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_unlock.S: Likewise.
	* sysdeps/sparc/sparc64/nptl/Makefile: File removed, its contents ...
	* sysdeps/sparc/sparc64/Makefile: ... appended here.

	* sysdeps/sparc/sparc32/nptl/lowlevellock.c: Moved ...
	* sysdeps/sparc/sparc32/lowlevellock.c: ... here.
	* sysdeps/sparc/sparc32/nptl/pthread_barrier_wait.c: Moved ...
	* sysdeps/sparc/sparc32/pthread_barrier_wait.c: ... here.
	* sysdeps/sparc/sparc32/nptl/pthread_spin_lock.S: Moved ...
	* sysdeps/sparc/sparc32/pthread_spin_lock.S: ... here.
	* sysdeps/sparc/sparc32/nptl/pthread_spin_trylock.S: Moved ...
	* sysdeps/sparc/sparc32/pthread_spin_trylock.S: ... here.
	* sysdeps/sparc/sparc32/nptl/pthreaddef.h: Moved ...
	* sysdeps/sparc/sparc32/pthreaddef.h: ... here.
	* sysdeps/sparc/sparc32/nptl/sem_post.c: Moved ...
	* sysdeps/sparc/sparc32/sem_post.c: ... here.
	* sysdeps/sparc/sparc32/nptl/sem_timedwait.c: Moved ...
	* sysdeps/sparc/sparc32/sem_timedwait.c: ... here.
	* sysdeps/sparc/sparc32/nptl/sem_trywait.c: Moved ...
	* sysdeps/sparc/sparc32/sem_trywait.c: ... here.
	* sysdeps/sparc/sparc32/nptl/sem_wait.c: Moved ...
	* sysdeps/sparc/sparc32/sem_wait.c: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/cpu_relax.S: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/cpu_relax.S: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/pthread_barrier_wait.c: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_init.c: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_lock.S: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_trylock.S: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_unlock.S: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/sem_post.c: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/sem_post.c: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/sem_timedwait.c: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/sem_timedwait.c: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/sem_trywait.c: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/sem_trywait.c: ... here.
	* sysdeps/sparc/sparc32/sparcv9/nptl/sem_wait.c: Moved ...
	* sysdeps/sparc/sparc32/sparcv9/sem_wait.c: ... here.

Comments

David Miller June 25, 2014, 5:13 a.m. UTC | #1
From: Roland McGrath <roland@hack.frob.com>
Date: Tue, 24 Jun 2014 18:29:08 -0700 (PDT)

> Let's see how close this gets to working for sparc.

Looks good, please merge.
Roland McGrath June 25, 2014, 5:07 p.m. UTC | #2
> From: Roland McGrath <roland@hack.frob.com>
> Date: Tue, 24 Jun 2014 18:29:08 -0700 (PDT)
> 
> > Let's see how close this gets to working for sparc.
> 
> Looks good, please merge.

Cool.  Thanks for the testing.

I've merged the roland/nptl-sparc branch in, but roland/nptl is still
separate (just rebased).  That branch affects everybody else too, and could
well be breaking builds other than x86, arm, and sparc so I need the
testing.  Unfortunately I think that leaves us in the position where the
trunk is broken for sparc and only the roland/nptl branch actually works.
But I hope it won't be much longer before we can merge it all in.


Thanks,
Roland
diff mbox

Patch

diff --git a/sysdeps/sparc/sparc32/nptl/lowlevellock.c b/sysdeps/sparc/sparc32/lowlevellock.c
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/lowlevellock.c
rename to sysdeps/sparc/sparc32/lowlevellock.c
diff --git a/sysdeps/sparc/sparc32/nptl/pthread_barrier_wait.c b/sysdeps/sparc/sparc32/pthread_barrier_wait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/pthread_barrier_wait.c
rename to sysdeps/sparc/sparc32/pthread_barrier_wait.c
diff --git a/sysdeps/sparc/sparc32/nptl/pthread_spin_lock.S b/sysdeps/sparc/sparc32/pthread_spin_lock.S
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/pthread_spin_lock.S
rename to sysdeps/sparc/sparc32/pthread_spin_lock.S
diff --git a/sysdeps/sparc/sparc32/nptl/pthread_spin_trylock.S b/sysdeps/sparc/sparc32/pthread_spin_trylock.S
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/pthread_spin_trylock.S
rename to sysdeps/sparc/sparc32/pthread_spin_trylock.S
diff --git a/sysdeps/sparc/sparc32/nptl/pthreaddef.h b/sysdeps/sparc/sparc32/pthreaddef.h
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/pthreaddef.h
rename to sysdeps/sparc/sparc32/pthreaddef.h
diff --git a/sysdeps/sparc/sparc32/nptl/sem_post.c b/sysdeps/sparc/sparc32/sem_post.c
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/sem_post.c
rename to sysdeps/sparc/sparc32/sem_post.c
diff --git a/sysdeps/sparc/sparc32/nptl/sem_timedwait.c b/sysdeps/sparc/sparc32/sem_timedwait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/sem_timedwait.c
rename to sysdeps/sparc/sparc32/sem_timedwait.c
diff --git a/sysdeps/sparc/sparc32/nptl/sem_trywait.c b/sysdeps/sparc/sparc32/sem_trywait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/sem_trywait.c
rename to sysdeps/sparc/sparc32/sem_trywait.c
diff --git a/sysdeps/sparc/sparc32/nptl/sem_wait.c b/sysdeps/sparc/sparc32/sem_wait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/nptl/sem_wait.c
rename to sysdeps/sparc/sparc32/sem_wait.c
diff --git a/sysdeps/sparc/sparc32/sparcv9/cpu_relax.S b/sysdeps/sparc/sparc32/sparcv9/cpu_relax.S
new file mode 100644
index 0000000..41a5e72
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/cpu_relax.S
@@ -0,0 +1 @@ 
+#include <sysdeps/sparc/sparc64/cpu_relax.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/cpu_relax.S b/sysdeps/sparc/sparc32/sparcv9/nptl/cpu_relax.S
deleted file mode 100644
index fa88647..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/nptl/cpu_relax.S
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <sysdeps/sparc/sparc64/nptl/cpu_relax.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_init.c b/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_init.c
deleted file mode 100644
index c8edcb0..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_init.c
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <sysdeps/sparc/sparc64/nptl/pthread_spin_init.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_lock.S b/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_lock.S
deleted file mode 100644
index f2b898d..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_lock.S
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <sysdeps/sparc/sparc64/nptl/pthread_spin_lock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_trylock.S b/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_trylock.S
deleted file mode 100644
index b324906..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_trylock.S
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <sysdeps/sparc/sparc64/nptl/pthread_spin_trylock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_unlock.S b/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_unlock.S
deleted file mode 100644
index 8c56ebe..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_spin_unlock.S
+++ /dev/null
@@ -1 +0,0 @@ 
-#include <sysdeps/sparc/sparc64/nptl/pthread_spin_unlock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/pthread_barrier_wait.c b/sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/sparcv9/nptl/pthread_barrier_wait.c
rename to sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c
new file mode 100644
index 0000000..1eede86
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c
@@ -0,0 +1 @@ 
+#include <sysdeps/sparc/sparc64/pthread_spin_init.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S
new file mode 100644
index 0000000..ce53dfa
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S
@@ -0,0 +1 @@ 
+#include <sysdeps/sparc/sparc64/pthread_spin_lock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S
new file mode 100644
index 0000000..ffd632d
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S
@@ -0,0 +1 @@ 
+#include <sysdeps/sparc/sparc64/pthread_spin_trylock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S
new file mode 100644
index 0000000..983c803
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S
@@ -0,0 +1 @@ 
+#include <sysdeps/sparc/sparc64/pthread_spin_unlock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/sem_post.c b/sysdeps/sparc/sparc32/sparcv9/sem_post.c
similarity index 100%
rename from sysdeps/sparc/sparc32/sparcv9/nptl/sem_post.c
rename to sysdeps/sparc/sparc32/sparcv9/sem_post.c
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/sem_timedwait.c b/sysdeps/sparc/sparc32/sparcv9/sem_timedwait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/sparcv9/nptl/sem_timedwait.c
rename to sysdeps/sparc/sparc32/sparcv9/sem_timedwait.c
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/sem_trywait.c b/sysdeps/sparc/sparc32/sparcv9/sem_trywait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/sparcv9/nptl/sem_trywait.c
rename to sysdeps/sparc/sparc32/sparcv9/sem_trywait.c
diff --git a/sysdeps/sparc/sparc32/sparcv9/nptl/sem_wait.c b/sysdeps/sparc/sparc32/sparcv9/sem_wait.c
similarity index 100%
rename from sysdeps/sparc/sparc32/sparcv9/nptl/sem_wait.c
rename to sysdeps/sparc/sparc32/sparcv9/sem_wait.c
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index fb161ea..dd3023d 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -14,3 +14,7 @@  ASFLAGS-.op += -Wa,-Av9d
 ASFLAGS-.og += -Wa,-Av9d
 ASFLAGS-.oS += -Wa,-Av9d
 endif
+
+ifeq ($(subdir),nptl)
+libpthread-routines += cpu_relax
+endif
diff --git a/sysdeps/sparc/sparc64/nptl/cpu_relax.S b/sysdeps/sparc/sparc64/cpu_relax.S
similarity index 100%
rename from sysdeps/sparc/sparc64/nptl/cpu_relax.S
rename to sysdeps/sparc/sparc64/cpu_relax.S
diff --git a/sysdeps/sparc/sparc64/nptl/Makefile b/sysdeps/sparc/sparc64/nptl/Makefile
deleted file mode 100644
index ddc9038..0000000
--- a/sysdeps/sparc/sparc64/nptl/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@ 
-ifeq ($(subdir),nptl)
-libpthread-routines += cpu_relax
-endif
diff --git a/sysdeps/sparc/sparc64/nptl/pthread_spin_init.c b/sysdeps/sparc/sparc64/pthread_spin_init.c
similarity index 100%
rename from sysdeps/sparc/sparc64/nptl/pthread_spin_init.c
rename to sysdeps/sparc/sparc64/pthread_spin_init.c
diff --git a/sysdeps/sparc/sparc64/nptl/pthread_spin_lock.S b/sysdeps/sparc/sparc64/pthread_spin_lock.S
similarity index 100%
rename from sysdeps/sparc/sparc64/nptl/pthread_spin_lock.S
rename to sysdeps/sparc/sparc64/pthread_spin_lock.S
diff --git a/sysdeps/sparc/sparc64/nptl/pthread_spin_trylock.S b/sysdeps/sparc/sparc64/pthread_spin_trylock.S
similarity index 100%
rename from sysdeps/sparc/sparc64/nptl/pthread_spin_trylock.S
rename to sysdeps/sparc/sparc64/pthread_spin_trylock.S
diff --git a/sysdeps/sparc/sparc64/nptl/pthread_spin_unlock.S b/sysdeps/sparc/sparc64/pthread_spin_unlock.S
similarity index 100%
rename from sysdeps/sparc/sparc64/nptl/pthread_spin_unlock.S
rename to sysdeps/sparc/sparc64/pthread_spin_unlock.S
diff --git a/sysdeps/sparc/sparc64/nptl/pthreaddef.h b/sysdeps/sparc/sparc64/pthreaddef.h
similarity index 100%
rename from sysdeps/sparc/sparc64/nptl/pthreaddef.h
rename to sysdeps/sparc/sparc64/pthreaddef.h