From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 26 Oct 2014 00:51:05 +0200 Subject: [U-Boot] [PATCH 1/2] tools/socfpgaimage.c: fix build on darwin In-Reply-To: <20141025092551.GA12204@amd> References: <1414186751-3061-1-git-send-email-andreas.devel@googlemail.com> <201410242340.13100.marex@denx.de> <20141025092551.GA12204@amd> Message-ID: <201410260051.05506.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday, October 25, 2014 at 11:25:51 AM, Pavel Machek wrote: > On Fri 2014-10-24 23:40:13, Marek Vasut wrote: > > On Friday, October 24, 2014 at 11:39:10 PM, andreas.devel at googlemail.com wrote: > > > From: Andreas Bie?mann > > > > > > socfpgaimage utilizes htole32 and friends, unfortunately these > > > functions are not available on darwin. Fix it by using the cpu_to_le32 > > > and friends defined in compiler.h as other parts in mkimage do. > > > > > > This patch fixes the following error: > > > ---8<--- > > > > > > HOSTCC tools/socfpgaimage.o > > > > > > tools/socfpgaimage.c:77:22: warning: implicit declaration of function > > > 'htole32' is invalid in C99 [-Wimplicit-function-declaration] > > > header.validation = htole32(VALIDATION_WORD); > > > > > > ^ > > > > > > tools/socfpgaimage.c:80:22: warning: implicit declaration of function > > > 'htole16' is invalid in C99 [-Wimplicit-function-declaration] > > > header.length_u32 = htole16(length_bytes/4); > > > > > > ^ > > > > > > tools/socfpgaimage.c:95:6: warning: implicit declaration of function > > > 'le32toh' is invalid in C99 [-Wimplicit-function-declaration] if > > > (le32toh(header.validation) != VALIDATION_WORD) > > > > > > ^ > > > > > > tools/socfpgaimage.c:97:6: warning: implicit declaration of function > > > 'le16toh' is invalid in C99 [-Wimplicit-function-declaration] if > > > (le16toh(header.checksum) != hdr_checksum(&header)) > > > > > > ^ > > > > > > 4 warnings generated. > > > ... > > > > > > HOSTLD tools/dumpimage > > > > > > Undefined symbols for architecture x86_64: > > > "_htole16", referenced from: > > > _socfpgaimage_set_header in socfpgaimage.o > > > > > > "_htole32", referenced from: > > > _socfpgaimage_set_header in socfpgaimage.o > > > > > > "_le16toh", referenced from: > > > _verify_buffer in socfpgaimage.o > > > > > > "_le32toh", referenced from: > > > _verify_buffer in socfpgaimage.o > > > > > > ld: symbol(s) not found for architecture x86_64 > > > --->8--- > > > > > > Signed-off-by: Andreas Bie?mann > > > > Acked-by: Marek Vasut > > Acked-by: Pavel Machek Applied, thanks. Best regards, Marek Vasut