Hi All,
I think that is the right time to start with arch dependent compilation.
Here is the patch which solve my problem with hyperthreading compilation.
Mike: Any comments? If not I'll prepare proper patch for Subrata.
Thanks,
Michal
diff --git a/Makefile b/Makefile
index 9f9668e..a0c371a 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,10 @@ AR=$(CROSS_COMPILER)ar
RANLIB=$(CROSS_COMPILER)ranlib
endif
+ifndef ARCH
+ARCH=i386
+endif
+
HAS_NUMA=$(shell sh tools/scripts/numa_test.sh)
export CFLAGS += -Wall $(CROSS_CFLAGS)
diff --git a/testcases/kernel/sched/Makefile
b/testcases/kernel/sched/Makefile
index 62a916c..f93e380 100644
--- a/testcases/kernel/sched/Makefile
+++ b/testcases/kernel/sched/Makefile
@@ -1,4 +1,8 @@
-SUBDIRS = cfs-scheduler clisrv hyperthreading nptl process_stress
pthreads sched_stress tool
+SUBDIRS = cfs-scheduler clisrv nptl process_stress pthreads
sched_stress tool
+
+ifeq ($(ARCH),i386)
+SUBDIRS += hyperthreading
+endif
all:
@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done
> On Saturday 28 February 2009 06:45:02 Jiri Palecek wrote:
>
>> On Friday 27 February 2009 17:13:06 Mike Frysinger wrote:
>>
>>> On Friday 27 February 2009 05:34:08 Michal Simek wrote:
>>>
>>>> I am getting this error. I haven't read VHDL microblaze code but I
>>>> believe that we don't hyperthreading
>>>> and I hope that a lot of cpu don't have it too. It is x86 specific test
>>>> and there is arch x86 asm code.
>>>> There should be any arch conditional compilation.
>>>> For my case when I cross compile for different arch compilation failed.
>>>>
>>>> Any idea how to fix it?
>>>>
>>> we address this by adding #ifdef checks to the source:
>>> #if defined(__i386__)
>>> ... test ...
>>> #else
>>> int main() { puts("test is not supported on your arch"); }
>>> #endif
>>>
>> I think this would be an overkill. In fact, there is conditional
>> compilation in the code right now - it only doesn't work when
>> cross-compiling. See:
>>
>
> i was talking in general. i didnt actually read this test case.
>
>
>> inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
>> {
>> #ifndef ARCH_i386
>> return;
>> #else
>> __asm__("cpuid"
>>
>> and ARCH_i386 comes from here:
>>
>> OSV := $(shell uname -m|grep i[3-6]86)
>> ifeq (,$(OSV))
>> else
>> export CFLAGS+= -DARCH_i386
>> endif
>>
>
> ok, this is clearly wrong
>
>
>> So it should probably be sufficient to replace ARCH_i386 with __i386__.
>>
>
> yes, if Michal wishes to submit a patch for that
>
>
>> Hope that works when cross-compiling, although I had never tried it.
>>
>
> if it doesnt, then the toolchain is broken and it isnt LTP's problem
> -mike
>
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list