[LLVMdev] how to build eglibc using llvm-gcc without unsupported -fno-toplevel-reorder

Sergey Yakoushkin sergey.yakoushkin at gmail.com
Mon Feb 22 15:59:39 PST 2010


Hi,

>> Are there any reasons why option can't be supported by llvm?
> It is hard and has very few users. For this to work you would have to
> add ordering information to the LLVM IL. It looks easier to patch
> eglibc.

I agree, impact of issue is limited. But it prevents out of the box
compilation of libraries for some targets.
Also, looks like glibc and eglibc maintainers do not welcome patches
for llvm (yet).

In general, saving order of appearance doesn't seem to be bad thing.
Are there any technical issues with addition of ordering?
I guess class Module and it's uses in parser (and linker) will be
mostly affected.
Currently Module stores different entities separately and concatenates
all top level asm into single string.
  FunctionListType FunctionList; ///< The Functions in the module
  std::string GlobalScopeAsm;    ///< Inline Asm at global scope.

Are there any other issues?

Regards,
Sergey Y.



More information about the llvm-dev mailing list