diff options
| author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-08-12 15:33:20 +0200 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2014-08-12 10:54:05 -0400 |
| commit | 99d7b5e858945b8bb160fe3fea77596b2daf07ff (patch) | |
| tree | cba4892c17076ab68ad174d0bbabb612a09573f6 /netboot.c | |
| parent | 77cdb40423e29a5f9d1318cd0ada874ee1916450 (diff) | |
| download | efi-boot-shim-99d7b5e858945b8bb160fe3fea77596b2daf07ff.tar.gz efi-boot-shim-99d7b5e858945b8bb160fe3fea77596b2daf07ff.zip | |
Factor out x86-isms and add cross compile support
This patch cleans up and refactors the Makefiles to better allow new
architectures to be added:
- remove unused Makefile definitions
- import Makefile definitions from top level rather than redefining
- move x86 specific CFLAGS to inside ifeq() blocks
- remove x86 inline asm
- allow $(FORMAT) to be overridden: this is necessary as there exists no
EFI or PE/COFF aware objcopy for ARM
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'netboot.c')
| -rw-r--r-- | netboot.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -40,15 +40,7 @@ #include "netboot.h" #include "str.h" -static inline unsigned short int __swap16(unsigned short int x) -{ - __asm__("xchgb %b0,%h0" - : "=q" (x) - : "0" (x)); - return x; -} - -#define ntohs(x) __swap16(x) +#define ntohs(x) __builtin_bswap16(x) /* supported both by GCC and clang */ #define htons(x) ntohs(x) static EFI_PXE_BASE_CODE *pxe; |
