Re: [x86 setup 13/33] Header file to produce 16-bit code with gcc

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

 



Segher Boessenkool wrote:
> 
>> For now, I have:
>>
>> CFLAGS          := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
>>                    $(cflags-$(ARCH)) \
>>                    -Wall -Wstrict-prototypes \
>>                    -march=i386 -mregparm=3 \
>>                    -include $(srctree)/$(src)/code16gcc.h \
>>                    -fno-strict-aliasing -fomit-frame-pointer \
>>                    $(call cc-option, -ffreestanding) \
>>                    $(call cc-option, -fno-unit-at-a-time) \
>>                    $(call cc-option, -fno-toplevel-reorder) \
>>                    $(call cc-option, -fno-stack-protector) \
>>                    $(call cc-option, -mpreferred-stack-boundary=2)
>>
>> ... since that will require less violence to eventually hack in the
>> proper -m16 option if/when it becomes available.
> 
> Looks good, except you don't want -fno-unit-at-a-time if
> -fno-toplevel-reorder works.  And of course it would be
> good to get rid of -fno-strict-aliasing, but let's not
> go there today ;-P
> 

OK, how does this look:

CFLAGS          := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
                   $(cflags-$(ARCH)) \
                   -Wall -Wstrict-prototypes \
                   -march=i386 -mregparm=3 \
                   -include $(srctree)/$(src)/code16gcc.h \
                   -fno-strict-aliasing -fomit-frame-pointer \
                   $(call cc-option, -ffreestanding) \
                   $(call cc-option, -fno-toplevel-reorder,\
                        $(call cc-option, -fno-unit-at-a-time)) \
                   $(call cc-option, -fno-stack-protector) \
                   $(call cc-option, -mpreferred-stack-boundary=2)

I think dropping -fno-strict-aliasing for this code is probably bad...
it's pretty low-level stuff which does a lot of bitlevel manipulation.

	-hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux