diff options
author | Leandro Lupori <luporl@FreeBSD.org> | 2019-05-20 19:21:35 +0000 |
---|---|---|
committer | Leandro Lupori <luporl@FreeBSD.org> | 2019-05-20 19:21:35 +0000 |
commit | ff7449d6f5a43a68e92bfaeb2de1f0bc6cc3acc7 (patch) | |
tree | fa3cd631dd9eb7bbac5bcc0f82a8b962c3b845f6 /stand/powerpc | |
parent | a1fa04c0673094b44b3a03121f43821939a7f3b5 (diff) | |
download | src-ff7449d6f5a43a68e92bfaeb2de1f0bc6cc3acc7.tar.gz src-ff7449d6f5a43a68e92bfaeb2de1f0bc6cc3acc7.zip |
[PowerPC64] stand: fix build using clang 8 as compiler
This change fixes "stand" build issues when using clang 8
as compiler.
Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D20026
Notes
Notes:
svn path=/head/; revision=348005
Diffstat (limited to 'stand/powerpc')
-rw-r--r-- | stand/powerpc/boot1.chrp/boot1.c | 1 | ||||
-rw-r--r-- | stand/powerpc/kboot/Makefile | 3 | ||||
-rw-r--r-- | stand/powerpc/kboot/main.c | 10 | ||||
-rw-r--r-- | stand/powerpc/ofw/elf_freebsd.c | 2 | ||||
-rw-r--r-- | stand/powerpc/ofw/ppc64_elf_freebsd.c | 2 |
5 files changed, 13 insertions, 5 deletions
diff --git a/stand/powerpc/boot1.chrp/boot1.c b/stand/powerpc/boot1.chrp/boot1.c index 5e54c95681b2..4d152efe1a70 100644 --- a/stand/powerpc/boot1.chrp/boot1.c +++ b/stand/powerpc/boot1.chrp/boot1.c @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); #include <machine/elf.h> #include <machine/stdarg.h> #include <machine/md_var.h> +#include <ufs/ffs/fs.h> #include "paths.h" diff --git a/stand/powerpc/kboot/Makefile b/stand/powerpc/kboot/Makefile index 8a6a0dee6544..671db88a14a9 100644 --- a/stand/powerpc/kboot/Makefile +++ b/stand/powerpc/kboot/Makefile @@ -36,9 +36,6 @@ CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc -# 64-bit bridge extensions -CFLAGS+= -Wa,-mppc64bridge - DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} diff --git a/stand/powerpc/kboot/main.c b/stand/powerpc/kboot/main.c index 633727ca6a7c..25eaf5064489 100644 --- a/stand/powerpc/kboot/main.c +++ b/stand/powerpc/kboot/main.c @@ -484,8 +484,18 @@ kboot_kseg_get(int *nseg, void **ptr) void _start(int argc, const char **argv, char **env) { +// This makes error "variable 'sp' is uninitialized" be just a warning on clang. +// Initializing 'sp' is not desired here as it would overwrite "r1" original value +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wuninitialized" +#endif register volatile void **sp asm("r1"); main((int)sp[0], (const char **)&sp[1]); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } /* diff --git a/stand/powerpc/ofw/elf_freebsd.c b/stand/powerpc/ofw/elf_freebsd.c index 76933064ff07..89811e965d6e 100644 --- a/stand/powerpc/ofw/elf_freebsd.c +++ b/stand/powerpc/ofw/elf_freebsd.c @@ -84,7 +84,7 @@ __elfN(ofw_exec)(struct preloaded_file *fp) if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", e->e_entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup(); if (dtbp != 0) { diff --git a/stand/powerpc/ofw/ppc64_elf_freebsd.c b/stand/powerpc/ofw/ppc64_elf_freebsd.c index 96efb1618646..38c664228c12 100644 --- a/stand/powerpc/ofw/ppc64_elf_freebsd.c +++ b/stand/powerpc/ofw/ppc64_elf_freebsd.c @@ -87,7 +87,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp) if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup(); |