You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/06/27 21:45:51 UTC
[incubator-nuttx] branch master updated (977f04a -> fd3be9e)
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from 977f04a libc: sysconf support _SC_NPROCESSORS_CONF/_SC_NPROCESSORS_ONLN
new 98f0b0a build/export: correct the export path
new e82a9e0 make/export: copy mkdeps.c for export build
new 41f4340 make/export: do not extract object from librarys
new fd3be9e make/export: support export extra library
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
tools/Makefile.export | 54 ++++++++++++++++++--------------
tools/mkexport.sh | 85 +++++++++++++++++++++++++--------------------------
2 files changed, 72 insertions(+), 67 deletions(-)
[incubator-nuttx] 02/04: make/export: copy mkdeps.c for export build
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit e82a9e0f486d7d32a10f678769725979fd45c7b1
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jun 24 10:14:09 2020 +0800
make/export: copy mkdeps.c for export build
Change-Id: Ic1aa04d5d4dd2332cf4a13ec51c76cdb7d90736c
Signed-off-by: chao.an <an...@xiaomi.com>
---
tools/mkexport.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/mkexport.sh b/tools/mkexport.sh
index 5f4721d..f0d3cfc 100755
--- a/tools/mkexport.sh
+++ b/tools/mkexport.sh
@@ -192,6 +192,10 @@ if [ ! -d "${ARCHDIR}" ]; then
exit 1
fi
+# Copy the depends script
+
+cp "${TOPDIR}/tools/mkdeps.c" "${EXPORTDIR}/tools/."
+
# Copy the default linker script
cp -f "${TOPDIR}/binfmt/libelf/gnu-elf.ld" "${EXPORTDIR}/scripts/."
[incubator-nuttx] 04/04: make/export: support export extra library
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit fd3be9eb37d9729b7138fc26184203da8e7ea2c2
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jun 24 10:31:06 2020 +0800
make/export: support export extra library
Change-Id: Iaab5dc8fd61b55888dad59d9b1d8380d7bd44a58
Signed-off-by: chao.an <an...@xiaomi.com>
---
tools/Makefile.export | 54 +++++++++++++++++++++++++++++----------------------
tools/mkexport.sh | 45 +++++++++++++++++++++++++++++++++++-------
2 files changed, 69 insertions(+), 30 deletions(-)
diff --git a/tools/Makefile.export b/tools/Makefile.export
index 893135c..2a2b7e9 100644
--- a/tools/Makefile.export
+++ b/tools/Makefile.export
@@ -61,40 +61,48 @@ default: all
$(EXPORTDIR)/makeinfo.sh: $(TOPDIR)/.config $(EXPORTDIR)/Make.defs
@echo "#!/bin/bash" > $(EXPORTDIR)/makeinfo.sh
@echo "" >> $(EXPORTDIR)/makeinfo.sh
- @echo "ARCHSUBDIR=\"$(ARCHSUBDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "AR=\"$(AR)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "ARCHCFLAGS=\"$(ARCHCFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "ARCHCPUFLAGS=\"$(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHDIR=\"$(ARCHDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
-ifdef ARCHSCRIPT
- @echo "LDNAME=\"$(LDNAME)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "LDDIR=\"$(LDDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "LDPATH=\"$(LDPATH)\"" >> $(EXPORTDIR)/makeinfo.sh
-endif
- @echo "ARCHCFLAGS=\"$(ARCHCFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "ARCHOPTIMIZATION=\"$(ARCHOPTIMIZATION)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHPICFLAGS=\"$(ARCHPICFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "ARCHSUBDIR=\"$(ARCHSUBDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHWARNINGS=\"$(ARCHWARNINGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHWARNINGSXX=\"$(ARCHWARNINGSXX)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "ARCHOPTIMIZATION=\"$(ARCHOPTIMIZATION)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "CROSSDEV=\"$(CROSSDEV)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "CC=\"$(CC)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "CXX=\"$(CXX)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "CPP=\"$(CPP)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "LD=\"$(LD)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "AR=\"$(AR)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "NM=\"$(NM)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "STRIP=\"$(STRIP)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "OBJCOPY=\"$(OBJCOPY)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "OBJDUMP=\"$(OBJDUMP)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "NXFLATLDFLAGS1=\"$(NXFLATLDFLAGS1)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "NXFLATLDFLAGS2=\"$(NXFLATLDFLAGS2)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "OBJEXT=\"$(OBJEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "LIBEXT=\"$(LIBEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "CROSSDEV=\"$(CROSSDEV)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "CXX=\"$(CXX)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "EXEEXT=\"$(EXEEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "EXTRA_LIBPATHS=\"$(EXTRA_LIBPATHS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "EXTRA_LIBS=\"$(EXTRA_LIBS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "EXTRA_OBJS=\"$(EXTRA_OBJS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTCC=\"$(HOSTCC)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "HOSTINCLUDES=\"$(HOSTINCLUDES)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTCFLAGS=\"$(HOSTCFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
- @echo "HOSTLDFLAGS=\"$(HOSTLDFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTEXEEXT=\"$(HOSTEXEEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "HOSTINCLUDES=\"$(HOSTINCLUDES)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "HOSTLDFLAGS=\"$(HOSTLDFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ifdef ARCHSCRIPT
+ @echo "LDDIR=\"$(LDDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "LDNAME=\"$(LDNAME)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "LDPATH=\"$(LDPATH)\"" >> $(EXPORTDIR)/makeinfo.sh
+endif
+ @echo "LD=\"$(LD)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "LDENDGROUP=\"$(LDENDGROUP)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "LDFLAGS=\"$(LDFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "LDLIBS=\"$(LDLIBS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "LDSCRIPT=\"$(LDSCRIPT)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "LDSTARTGROUP=\"$(LDSTARTGROUP)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "LIBEXT=\"$(LIBEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "NM=\"$(NM)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "NXFLATLDFLAGS1=\"$(NXFLATLDFLAGS1)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "NXFLATLDFLAGS2=\"$(NXFLATLDFLAGS2)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "OBJCOPY=\"$(OBJCOPY)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "OBJDUMP=\"$(OBJDUMP)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "OBJEXT=\"$(OBJEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
+ @echo "STRIP=\"$(STRIP)\"" >> $(EXPORTDIR)/makeinfo.sh
$(Q) chmod 755 $(EXPORTDIR)/makeinfo.sh
clean:
diff --git a/tools/mkexport.sh b/tools/mkexport.sh
index 3e0830c..5e84f71 100755
--- a/tools/mkexport.sh
+++ b/tools/mkexport.sh
@@ -233,6 +233,7 @@ fi
# Save the compilation options
echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/scripts/Make.defs"
+echo "ARCHCPUFLAGS = ${ARCHCPUFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "ARCHPICFLAGS = ${ARCHPICFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "ARCHWARNINGS = ${ARCHWARNINGS}" >>"${EXPORTDIR}/scripts/Make.defs"
@@ -263,13 +264,13 @@ echo "LDSCRIPT = ${LDSCRIPT}" >>"${EXPORTDIR}/scripts/Make.defs"
# Additional compilation options when the kernel is built
if [ "X${USRONLY}" != "Xy" ]; then
- echo "LDFLAGS = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
- echo "HEAD_OBJ = ${HEAD_OBJ}" >>"${EXPORTDIR}/scripts/Make.defs"
- echo "EXTRA_OBJS = ${EXTRA_OBJS}" >>"${EXPORTDIR}/scripts/Make.defs"
- echo "LDSTARTGROUP = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
- echo "EXTRA_LIBS = ${EXTRA_LIBS}" >>"${EXPORTDIR}/scripts/Make.defs"
- echo "LIBGCC = ${LIBGCC}" >>"${EXPORTDIR}/scripts/Make.defs"
- echo "LDENDGROUP = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+ echo "EXTRA_LIBS = ${EXTRA_LIBS}" >>"${EXPORTDIR}/scripts/Make.defs"
+ echo "EXTRA_OBJS = ${EXTRA_OBJS}" >>"${EXPORTDIR}/scripts/Make.defs"
+ echo "HEAD_OBJ = ${HEAD_OBJ}" >>"${EXPORTDIR}/scripts/Make.defs"
+ echo "LDENDGROUP = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+ echo "LDFLAGS = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
+ echo "LDSTARTGROUP = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+ echo "LIBGCC = ${LIBGCC}" >>"${EXPORTDIR}/scripts/Make.defs"
fi
# Copy the system map file(s)
@@ -378,6 +379,36 @@ for lib in ${LIBLIST}; do
cp ${TOPDIR}/${lib} ${EXPORTDIR}/libs
done
+# Process extra librarys
+
+for lib in ${EXTRA_LIBS}; do
+
+ # Convert library name
+
+ if [ ${lib:0:2} = "-l" ]; then
+ lib=`echo "${lib}" | sed -e "s/-l/lib/" -e "s/$/${LIBEXT}/"`
+ fi
+
+ for path in ${EXTRA_LIBPATHS}; do
+
+ # Skip the library path options
+
+ if [ ${#path} == 2 ]; then continue; fi
+
+ if [ ${path:0:2} = "-l" ] || [ ${path:0:2} = "-L" ]; then
+ path=${path:2}
+ fi
+
+ # Export the extra librarys
+
+ if [ -f "${path}/${lib}" ]; then
+ cp -a ${path}/${lib} ${EXPORTDIR}/libs
+ break
+ fi
+
+ done
+done
+
# Copy the essential build script file(s)
cp -f "${TOPDIR}/tools/Config.mk" "${EXPORTDIR}/tools/"
[incubator-nuttx] 03/04: make/export: do not extract object from
librarys
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 41f434015bb28ecdca72002b6f47b75063a97e3c
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Jun 24 10:26:56 2020 +0800
make/export: do not extract object from librarys
To avoid overriding of objects with duplicate file name
Change-Id: I83c964d161d23942cd3fc29eb738da44775cfc10
Signed-off-by: chao.an <an...@xiaomi.com>
---
tools/mkexport.sh | 52 +++++++---------------------------------------------
1 file changed, 7 insertions(+), 45 deletions(-)
diff --git a/tools/mkexport.sh b/tools/mkexport.sh
index f0d3cfc..3e0830c 100755
--- a/tools/mkexport.sh
+++ b/tools/mkexport.sh
@@ -267,7 +267,6 @@ if [ "X${USRONLY}" != "Xy" ]; then
echo "HEAD_OBJ = ${HEAD_OBJ}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "EXTRA_OBJS = ${EXTRA_OBJS}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "LDSTARTGROUP = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
- echo "LDLIBS = ${LDLIBS}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "EXTRA_LIBS = ${EXTRA_LIBS}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "LIBGCC = ${LIBGCC}" >>"${EXPORTDIR}/scripts/Make.defs"
echo "LDENDGROUP = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
@@ -362,58 +361,21 @@ if [ "X${USRONLY}" != "Xy" ]; then
fi
fi
+LDLIBS=`basename -a ${LIBLIST} | sed -e "s/lib/-l/g" -e "s/\.${LIBEXT:1}//g" | tr "\n" " "`
+
+if [ "X${USRONLY}" != "Xy" ]; then
+ echo "LDLIBS = ${LDLIBS}" >>"${EXPORTDIR}/scripts/Make.defs"
+fi
+
# Then process each library
-AR=${CROSSDEV}ar
for lib in ${LIBLIST}; do
if [ ! -f "${TOPDIR}/${lib}" ]; then
echo "MK: Library ${TOPDIR}/${lib} does not exist"
exit 1
fi
- # Get some shorter names for the library
-
- libname=`basename ${lib} ${LIBEXT}`
- shortname=`echo ${libname} | sed -e "s/^lib//g"`
-
- # Copy the application library unmodified
-
- if [ "X${libname}" = "Xlibapps" ]; then
- cp -p "${TOPDIR}/${lib}" "${EXPORTDIR}/libs/." || \
- { echo "MK: cp ${TOPDIR}/${lib} failed"; exit 1; }
- else
-
- # Create a temporary directory and extract all of the objects there
- # Hmmm.. this probably won't work if the archiver is not 'ar'
-
- mkdir "${EXPORTDIR}/tmp" || \
- { echo "MK: 'mkdir ${EXPORTDIR}/tmp' failed"; exit 1; }
- cd "${EXPORTDIR}/tmp" || \
- { echo "MK: 'cd ${EXPORTDIR}/tmp' failed"; exit 1; }
- if [ "X${WINTOOL}" = "Xy" ]; then
- WLIB=`cygpath -w "${TOPDIR}/${lib}"`
- ${AR} x "${WLIB}"
- else
- ${AR} x "${TOPDIR}/${lib}"
- fi
-
- # Rename each object file (to avoid collision when they are combined)
- # and add the file to libnuttx
-
- for file in `ls`; do
- mv "${file}" "${shortname}-${file}"
- if [ "X${WINTOOL}" = "Xy" ]; then
- WLIB=`cygpath -w "${EXPORTDIR}/libs/libnuttx${LIBEXT}"`
- ${AR} rcs "${WLIB}" "${shortname}-${file}"
- else
- ${AR} rcs "${EXPORTDIR}/libs/libnuttx${LIBEXT}" "${shortname}-${file}"
- fi
- done
-
- cd "${TOPDIR}" || \
- { echo "MK: 'cd ${TOPDIR}' failed"; exit 1; }
- rm -rf "${EXPORTDIR}/tmp"
- fi
+ cp ${TOPDIR}/${lib} ${EXPORTDIR}/libs
done
# Copy the essential build script file(s)
[incubator-nuttx] 01/04: build/export: correct the export path
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 98f0b0afb55359ed88bb92929fd13b68447fdb5d
Author: chao.an <an...@xiaomi.com>
AuthorDate: Sat Jun 13 20:20:41 2020 +0800
build/export: correct the export path
Change-Id: Ia2e19f30d32154c3329f46c5d8362fafd6b7e274
Signed-off-by: chao.an <an...@xiaomi.com>
---
tools/mkexport.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mkexport.sh b/tools/mkexport.sh
index 6b96e27..5f4721d 100755
--- a/tools/mkexport.sh
+++ b/tools/mkexport.sh
@@ -432,7 +432,7 @@ cd "${TOPDIR}" || \
{ echo "MK: 'cd ${TOPDIR}' failed"; exit 1; }
if [ -e "${APPDIR}/Makefile" ]; then
- "${MAKE}" -C "${TOPDIR}/${APPDIR}" EXPORTDIR="$(cd "${EXPORTSUBDIR}" ; pwd )" TOPDIR="${TOPDIR}" export || \
+ "${MAKE}" -C "${APPDIR}" EXPORTDIR="$(cd "${EXPORTSUBDIR}" ; pwd )" TOPDIR="${TOPDIR}" export || \
{ echo "MK: call make export for APPDIR not supported"; }
fi