bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error with gnumach compilation


From: James Clarke
Subject: Re: Error with gnumach compilation
Date: Fri, 15 Feb 2019 13:41:40 +0000

On 15 Feb 2019, at 13:33, Almudena Garcia <liberamenso10000@gmail.com> wrote:
> El vie., 15 feb. 2019 a las 14:28, James Clarke (<jrtc27@jrtc27.com>) 
> escribió:
>> On 15 Feb 2019, at 13:21, Samuel Thibault <samuel.thibault@gnu.org> wrote:
>> > 
>> > Almudena Garcia, le ven. 15 févr. 2019 14:13:17 +0100, a ecrit:
>> >> This is defined in imps/cpu_number.h , included in kern/cpu_number.h
>> > 
>> > cswitch.S includes i386/cpu_number.h, not kern/cpu_number.h
>> > 
>> > Really, make sure it gets defined, that's very most probably the issue,
>> > or else it's the CPU_NUMBER macro which is not actually valid assembly.
>> 
>> Well, I had checked before sending my email, and i386/cpu_number.h does not
>> define CPU_NUMBER, though I was unaware of kern/cpu_number.h. The latter does
>> define a cpu_number function, but it's a C header, not for use in assembly.
>> Your `smp` branch fixes this in [1] by making CPU_NUMBER a macro that calls
>> cpu_number (though I might suggest that you make the macro do nothing for
>> NCPUS==1). Honestly, this is not a hard bug to find, it took all of a few
>> minutes for me. You've had more than enough information from us to pinpoint 
>> the
>> problem; this mailing list is really not for simple programming questions 
>> like
>> this.
>> 
>> James
>> 
>> [1] 
>> https://github.com/AlmuHS/GNUMach_SMP/commit/371df36e565f4408737948ccc3d25acf2e1ccb57
> 
> I removed this macro tonight, to write a better solution.
> 
> https://github.com/AlmuHS/GNUMach_SMP/commit/342b7d62168bcaca944d01c0550b899da5d7f0c5
> 
> I've got to enabled correctly this macro, and feels that CPU_NUMBER assembly 
> macro is enabled, but compiler shows another error
> 
> ../i386/i386/cswitch.S: Mensajes del ensamblador:
> ../i386/i386/cswitch.S:46: Error: operandos inválidos (secciones *UND* y 
> *UND*) para «+»
> ../i386/i386/cswitch.S:64: Error: operandos inválidos (secciones *UND* y 
> *UND*) para «+»
> ../i386/i386/cswitch.S:116: Error: operandos inválidos (secciones *UND* y 
> *UND*) para «+»

This is now getting really tiring. It's complaining about both operands to +
being undefined, on lines where you're using CPU_NUMBER. CPU_NUMBER is defined
by you as:

#define CPU_NUMBER(reg)         \
        movzbl  APIC_LOCAL_VA+APIC_LOCAL_UNIT_ID+3,reg

Which of those operands for + look like they could be undefined symbols to you?
Seriously, you need to learn to fix these things for yourself.

James




reply via email to

[Prev in Thread] Current Thread [Next in Thread]