mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
More fixe for FreeBSD build
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3919 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -66,6 +66,13 @@ ARCHPICFLAGS = -fpic
|
|||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
|
|
||||||
|
ifeq ($(HOSTOS),FreeBSD)
|
||||||
|
HOST_ARCH = ${shell uname -m 2>/dev/null || echo "Other"}
|
||||||
|
ifeq ($(HOST_ARCH),amd64)
|
||||||
|
ARCHCPUFLAGS += -m32
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# We have to use a cross-development toolchain under Cygwin because the native
|
# We have to use a cross-development toolchain under Cygwin because the native
|
||||||
# Cygwin toolchains don't generate ELF binaries.
|
# Cygwin toolchains don't generate ELF binaries.
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,13 @@ ARCHPICFLAGS = -fpic
|
|||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
|
|
||||||
|
ifeq ($(HOSTOS),FreeBSD)
|
||||||
|
HOST_ARCH = ${shell uname -m 2>/dev/null || echo "Other"}
|
||||||
|
ifeq ($(HOST_ARCH),amd64)
|
||||||
|
ARCHCPUFLAGS += -m32
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# We have to use a cross-development toolchain under Cygwin because the native
|
# We have to use a cross-development toolchain under Cygwin because the native
|
||||||
# Cygwin toolchains don't generate ELF binaries.
|
# Cygwin toolchains don't generate ELF binaries.
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ int flash_eraseall(FAR const char *driver)
|
|||||||
ret = open_blockdriver(driver ,0, &inode);
|
ret = open_blockdriver(driver ,0, &inode);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
fdbg("ERROR: Failed to open '%s': %d\n", driver, ret);
|
fdbg("ERROR: Failed to open '%s': %d\n", driver, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,6 +104,10 @@ int flash_eraseall(FAR const char *driver)
|
|||||||
if (ops->ioctl)
|
if (ops->ioctl)
|
||||||
{
|
{
|
||||||
ret = ops->ioctl(inode, MTDIOC_BULKERASE, 0);
|
ret = ops->ioctl(inode, MTDIOC_BULKERASE, 0);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, ret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close the block driver */
|
/* Close the block driver */
|
||||||
|
|||||||
+1
-1
@@ -123,7 +123,7 @@ if [ -z "${appdir}" ]; then
|
|||||||
|
|
||||||
unset CONFIG_VERSION_STRING
|
unset CONFIG_VERSION_STRING
|
||||||
if [ -x "${TOPDIR}/.version" ]; then
|
if [ -x "${TOPDIR}/.version" ]; then
|
||||||
source "${TOPDIR}/.version"
|
. "${TOPDIR}/.version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for an unversioned apps/ directory
|
# Check for an unversioned apps/ directory
|
||||||
|
|||||||
Reference in New Issue
Block a user