[cfe-dev] Compiling xv6 with Clang
Csaba Raduly via cfe-dev
cfe-dev at lists.llvm.org
Fri Nov 9 01:49:17 PST 2018
Hi Ahmad,
On Fri, Nov 9, 2018 at 12:08 AM Ahmad Nouralizadeh Khorrami via
cfe-dev <cfe-dev at lists.llvm.org> wrote:
>
> Hi David,
> The problem is still there. The sequence of commands to build the bootblock (for gcc) is as follows:
> gcc -fno-pic -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb -m32 -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pic -O -nostdinc -I. -c bootmain.c
You seem to have a -O towards the end of the command line, which would
override the earlier -O2 . Is this intentional?
You have two object files (bootmain.o and bootasm.o). Compare the
sizes generated by gcc and clang for both object files.
You could use -save-temps when compiling the .c file to look at the
generated assembly and try to spot differences between clang and GCC.
Csaba
--
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
More information about the cfe-dev
mailing list