Commit Graph

46 Commits

Author SHA1 Message Date
xuxin19 2cfd0783bc tools/mkdeps.c:add options for gen full path object target
Check g_altpath. If only the CURRENT path is included,
the obj target use its own full path, otherwise just use the filename.

add default value current path for obj-path.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-09 14:21:47 +08:00
Alin Jerpelea c9eef2d697 tools: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-10 23:11:11 +08:00
chao an e11c793b33 toolchain/tasking: add dependencies rules for tasking compiler
Tasking compiler uses customized compilation options for generating dependencies files

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-19 03:36:43 -08:00
haopengxiang ef3f807f89 tools/mkdeps: increase MAX_BUFFER/MAX_EXPAND/MAX_SHQUOTE to 16384
solve CFLAG is too long when building in deep path

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-09-09 00:47:59 +08:00
chao an 664927c86e mm/alloc: remove all unnecessary cast for alloc
Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
haopengxiang fc81bb8b36 nuttx: increase MAX_BUFFER to 10240 for CI build
01:28:16  ERROR: CFLAG string is too long [8194/8192]: '-nostdinc++' '-fno-exceptions' '-fcheck-new' '-std=c++17' '-pipe' '-Os' '-fno-strict-aliasing' '-fomit-frame-pointer' '-fstack-protector-all' '-mthumb' '-Wa,-mthumb' '-Wa,-mimplicit-it=always' '-fno-common' '-Wall' '-Wshadow' '-Wundef' '-ffunction-sections' '-fdata-sections' '-g' '-mlittle-endian' '-march=armv8-m.main+dsp' '-mtune=cortex-m33' '-mfpu=fpv5-sp-d16' '-mfloat-abi=hard' '-isystem' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/nuttx/include/libcxx' '-isystem' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/nuttx/include' '-D__NuttX__' '-D__KERNEL__' '-Wno-cpp' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/crypto' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/crypto/mbedtls/mbedtls/include' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/system/uorb/' '-I' '/home/work/ssd1/workspace/MiRTOS-Dev-Daily-Build/out/86v1/ap_test/.unionfs/apps/system/libuv/libuv/include' '-I'

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-01-28 09:05:06 +02:00
nietingting 5d45ec6d03 update MAX_SHQUOTE to 4096
Signed-off-by: nietingting <nietingting@xiaomi.com>
2023-01-28 09:05:06 +02:00
zouboan fd9838f41f tools/mkdeps:Fix an error caused by do_shquote in Windows native build
tools/mkdeps:Fix an error caused by do_shquote in Windows native build

tools/mkdeps:Fix an error caused by do_shquote in Windows native build
2022-12-01 01:47:46 +08:00
nietingting dd70d29d4e tools/mkdeps: Extend MAX_SHQUOTE to 3072
Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-04-10 09:55:14 +03:00
Gustavo Henrique Nihei 76acb32e29 Fix typos reported by codespell 2021-02-25 11:31:49 -08:00
Alin Jerpelea 7ff60d7c5b tools: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-18 11:26:21 -08:00
ligd 9ee04b5c53 tools/mkdeps.c: increase MAX_BUFFER to 8192
Change-Id: I0221194a647ff5083c951d682289793430e4268a
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-21 20:10:47 -08:00
Fotis Panagiotopoulos 3eee887d87 Typo fix. 2020-10-06 19:44:56 -03:00
Xiang Xiao 6a84d96bca tools/mkdeps: Fix EOVERFLOW returned by stat when CONFIG_SIM_M32=y
by define _FILE_OFFSET_BITS to 64 described here:
https://man7.org/linux/man-pages/man2/stat.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I19c079294b79a541fbcc0bf5acbf7377067acf98
2020-09-25 20:41:22 -03:00
YAMAMOTO Takashi 44585eeaf8 mkdeps: Use %zu/%zd printf format instead of casts 2020-06-03 18:30:36 +08:00
YAMAMOTO Takashi 16884407eb mkdeps: Quote CFLAGS to be safe with the shell
mkdeps uses system() thus a shell to execute cc.
it doesn't work if you have something like

    CFLAGS   += -DMBEDTLS_USER_CONFIG_FILE="<mbedtls/user_config.h>"

because the shell interprets "<" as a redirect.

to fix it, we should do either

    * make it shell-quote arguments

    * or, stop using system()

this commit implements the former.

some platforms provide easy ways to do the former.
eg. https://netbsd.gw.com/cgi-bin/man-cgi?shquote++NetBSD-current
but unfortunately none of them seems available widely.

i guess the latter approach is more common.
eg. 4464250282/usr.bin/mkdep/mkdep.c (L137-L154)
but i might be a burden for windows. (i don't know)
2020-06-03 18:30:36 +08:00
Xiang Xiao 02e028a595 tools/mkdeps: Fix the nxstyle problem
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 09:27:36 -06:00
Xiang Xiao d2bb9bf2b4 tools/mkdeps: Always look in the current directory
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 09:27:36 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Anatol Ivanov 1dad62d3b7 Squashed commit of the following:
tools/configure.c: Add missing '\n' in printf statement

    tools/configure.c: Add missed -g option to getopt() string

    tools/configure.c and tools/configure.sh:  Fix Windows native pre-build kconfig-conf incompability.  Looks like prebuilt Windows native kconfig-conf interprets "..\apps" as "..apps" (possibly '\a' as escape-sequence) so expand winnative path to double-backslashed variant "..\\apps".

    tools/mkdeps.c:  Fix '\0' missing in MinGW.  Implicit bug. There are 2 cases.

    1. Under Linux.  The code works as planned: '\n' is always replaced with '\0' due to sprintf fills n-1 bytes and reaches buffer length limit.

    2. Under Windows/MinGW. There is memory corruption.  Seems like it`s a bug inside MinGW/snprintf.  Snprintf fills consecutively "oldbase",' ',"str",'\n', but does not inserts trailing '\0' instead of '\n'.  And when next append() occurs, strlen() returns garbage-appended "oldbase".

    So the fix just removes '\n' and reserves space for '\0'.

    tools/link.bat: Fix .fakelink creation

    configs/Makefile and tools/Config.mk:  Move single file copy to the new function COPYFILE.  This fixes the Windows native build case when there is no cp or cp does not recognize Windows paths.
2018-11-05 16:35:28 -06:00
Jeff 25e4fb2886 tools/mkdeps.c: Eliminate a warning. MAX_PATH may already be defined in included system files. 2017-08-04 12:25:38 -06:00
Gregory Nutt 61e0eb8006 Use name, not CONFIG_ settings, to determine host OS; Fix errors in help text. 2016-01-10 13:09:10 -06:00
Gregory Nutt a6da474a69 Update ChangeLog; fix some tools/mkdeps.c compile issue in non-Cygwin environemnts 2016-01-10 13:02:51 -06:00
Gregory Nutt 65826c7f21 tools/mkdeps.c: Fix error in calculation of the length of the command 2016-01-10 11:15:30 -06:00
Gregory Nutt 76f4c2bf20 tools/mkdeps.c: Correct logic that exands paths 2016-01-10 10:16:21 -06:00
Gregory Nutt e5c8290d5c Should use --winpath option, not the --winnative option 2016-01-10 09:25:32 -06:00
Gregory Nutt 5ec04daaa2 Extending tools/mkdeps.c 2016-01-09 19:52:24 -06:00
Gregory Nutt 0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt b7715ee018 Remove warning about redefined strtok_r 2014-12-08 08:28:22 -06:00
Gregory Nutt 935e76df9f Changes to try to get P112 to compile with laster SDCC (it still does not) 2014-08-22 14:48:29 -06:00
Gregory Nutt befcb1c961 Fix some cloned errors in SAM GPIO interrupt setup 2014-07-07 15:54:37 -06:00
Gregory Nutt b72679c5d0 NAME_MAX not available on SunOS 2014-07-04 07:22:36 -06:00
Gregory Nutt 91b002a043 Many changes to reduce complaints from CppCheck. Several latent bugs fixes, but probably some new typos introduced 2014-02-10 18:08:49 -06:00
Gregory Nutt b9a38cea22 nuttx/tools: Fixes for some Windows native build issues from Max Holtzberg 2014-01-04 09:08:14 -06:00
Gregory Nutt 9dc8d00bd1 Fix a error in a recent checkin to fix dependencies wehn object files lie in sub-directories 2013-09-30 20:31:49 -06:00
Gregory Nutt c038f4efe0 Dependency generation fix for directories that keep object files in a sub-directory 2013-09-29 11:46:10 -06:00
Gregory Nutt 88c0911fb1 Various changes and bigfixes for problems detected by CppCheck 2013-05-09 14:23:34 -06:00
patacongo f8ad7573a5 Update for ez80 Windows native build (still does not work)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5377 42af7a65-404d-4744-a932-0658087f49c3
2012-11-21 17:44:14 +00:00
patacongo 167d95b3a2 Convert configs/ez80f910200kitg/RCS/ostest to use the newer mconf-based configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5375 42af7a65-404d-4744-a932-0658087f49c3
2012-11-20 21:19:36 +00:00
patacongo d114cd19e5 mkdeps.c: Oops MinGW does not have WEXITSTATUS; Now all of NuttX on native Windows WITH dependencies (still some link time problems).
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5350 42af7a65-404d-4744-a932-0658087f49c3
2012-11-13 23:05:48 +00:00
patacongo fd6f8f5eca mkdeps.c: Fix some strtok logic; fix some system() return value check
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5349 42af7a65-404d-4744-a932-0658087f49c3
2012-11-13 22:47:44 +00:00
patacongo 4ee266d94b Centralized the definition of the INCDIR script in tools/Config.mk
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5346 42af7a65-404d-4744-a932-0658087f49c3
2012-11-13 20:24:30 +00:00
patacongo 3dee46c307 Oops.. nested strtok in mkdeps.c, need to use strtok_r
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5345 42af7a65-404d-4744-a932-0658087f49c3
2012-11-13 17:18:42 +00:00
patacongo 0b27df8f5c Mostly cosmetic changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5344 42af7a65-404d-4744-a932-0658087f49c3
2012-11-13 15:50:38 +00:00
patacongo 46541cf0fa Fix some mkdeps.c issues; Incorporate mkdeps.c build in Makefiles
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5343 42af7a65-404d-4744-a932-0658087f49c3
2012-11-13 02:39:01 +00:00
patacongo 8f47445bd5 Add tools/mkdeps.bat and tools/mkdeps.c
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5342 42af7a65-404d-4744-a932-0658087f49c3
2012-11-13 00:38:59 +00:00