This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc 860 and glibc sysdeps/powerpc/power3/memset.S: CPU15 ?"dcbX" errata


Hello Yann!

Thanks for your reponse. Let me just say... i am VERY happy with crosstool-ng
so far, thank you so much the time and effort you spent on it, it is simply
awesome.

On Thu, Oct 23, 2008 at 10:05:45PM +0200, Yann E. MORIN wrote:
> > but what is the recommended way to make 
> > this happen? Add "-DBROKEN_PPC_8xx_CPU15" to CT_LIBC_GLIBC_EXTRA_CFLAGS
> > in my config? Or is there better way?
> 
> I'd say, in scripts/build/arch/powerpc.sh, check the target processor and
> update CT_LIBC_GLIBC_EXTRA_CFLAGS accordingly, something /like/:
> 
> case "${CT_ARCH_CPU}" in
>   8??)
>     # http://pointer.to/this/thread.html
>     CT_DoLog DEBUG "Activating support for memset on broken ppc-8xx"
>     CT_LIBC_GLIBC_EXTRA_CFLAGS="${CT_LIBC_GLIBC_EXTRA_CFLAGS} -DBROKEN_PPC_8xx_CPU15"
>     ;;
> esac

That is exactly the approach i was taking, but the current svn trunk is broken
for save config when i was debugging my case statement:

$ ./ct-ng saveconfig
/export/local/crosstool-ng-svn/scripts/functions: line 706: CT_DoKernelTupleValues: command not found
[ERROR]  Build failed in step '<none>'
[ERROR]  Error happened in '/export/local/crosstool-ng-svn/scripts/functions' in function 'CT_DoBuildTargetTuple' (line unknown, sorry)
[ERROR]        called from '/export/local/crosstool-ng-svn/scripts/saveSample.sh' at line # 31 in function 'main'
[ERROR]  Look at '' for more info on this error.
[ERROR]  (elapsed: 20413184:19.56)
make: *** [saveconfig] Error 127

The fix is probably something like:

Index: scripts/saveSample.sh
===================================================================
--- scripts/saveSample.sh	(revision 1120)
+++ scripts/saveSample.sh	(working copy)
@@ -26,6 +26,7 @@
 
 # Parse architecture-specific functions
 . "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
+. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
 
 # Target tuple: CT_TARGET needs a little love:
 CT_DoBuildTargetTuple

> Better yet: does the glibc build system has a variable in which we have the
> CPU value? Then we wouldn't need to set any additional deine, and rely on
> the glibc internals, such as:
> #if (   ( defined CPU_801 ) \
>      || ( defined CPU_821 ) \
>      || ( defined CPU_823 ) \
>      || ( defined CPU_860 ) )
> blah
> #endif
> 
> Maybe we can rely on gcc setting such a define?

I WISH! So far i have not found any such handy CPU defines, but I am by no
means a glibc expert.

I assume the glibc bloatware developer approved way might be to actually detect
the appropriate version of the running ppc cpu at runtime, in memset.S!

> Regards, and thank you for looking into this!
> Yann E. MORIN.

NO Yann, thank you!

BTW i am having a tough time finding an efficient workflow for testing
patches... is there a target to simply untar a fresh code tarball into
target/src and apply all the patches, then stop?

-- 
Nye Liu
nliu@mrv.com
(818) 772-6235x248
(818) 772-0576 fax

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]