diff options
| author | Dimitry Andric <dimitry@andric.com> | 2019-01-30 06:31:52 +0000 |
|---|---|---|
| committer | Dimitry Andric <dimitry@andric.com> | 2019-01-30 06:31:52 +0000 |
| commit | 19b134cc4436586c6ab837f1b77b4c4e3fd9f57e (patch) | |
| tree | b5abeffda95703295545b0252a15cdf9facfc2f0 /clang/lib/Serialization/ModuleFileExtension.cpp | |
| parent | 77bc7355163b14b34123dabaa12a3a30e80a30f1 (diff) | |
| download | bcm5719-llvm-19b134cc4436586c6ab837f1b77b4c4e3fd9f57e.tar.gz bcm5719-llvm-19b134cc4436586c6ab837f1b77b4c4e3fd9f57e.zip | |
Recognize FreeBSD specific BFD names in OUTPUT_FORMAT
Summary:
After rLLD344952 ("Add OUTPUT_FORMAT linker script directive support"),
using BFD names such as `elf64-x86-64-freebsd` the `OUTPUT_FORMAT`
linker script command does not work anymore, resulting in errors like:
```
ld: error: /home/dim/src/clang800-import/stand/efi/loader/arch/amd64/ldscript.amd64:2: unknown output format name: elf64-x86-64-freebsd
>>> OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", "elf64-x86-64-freebsd")
>>> ^
```
To fix this, recognize a `-freebsd` suffix in BFD names, and also set
`Configuration::OSABI` to `ELFOSABI_FREEBSD` for those cases.
Add and/or update several test cases to check for the correct results of
these new `OUTPUT_FORMAT` arguments.
Reviewers: ruiu, atanasyan, grimar, hokein, emaste, espindola
Reviewed By: ruiu
Subscribers: nemanjai, javed.absar, arichardson, krytarowski, kristof.beyls, kbarton, llvm-commits
Differential Revision: https://reviews.llvm.org/D57283
llvm-svn: 352606
Diffstat (limited to 'clang/lib/Serialization/ModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions

