dd4abe0a6a
R56c is a bugfix-only release everyone must upgrade to: [komh] Remove redundant OS/2-specific code, clean up others [komh, tg] Fix drive-qualified (absolute and relative) DOS-style path support in realpath functionality, partially other places [tg] Don’t substitute ${ENV:-~/.mkshrc} result again [tg] Improve OS/2 $PATH (et al.) handling, drive-relative paths [tg] Add MKSH_ENVDIR compile-time option for Jehanne and Plan 9 [tg] Limit nesting when parsing malformed code (Debian #878947) [tg] Update wcwidth data with bugfixed script (still Unicode 10; resulting values are identical to glibc git master for extant chars) [Dr. Werner Fink] Raise some time limits in the testsuite [Shamar] Add support for the Jehanne operating system [komh] Set stdin to text mode before executing child processes on OS/2 [komh] Pass arguments via a resonse file if executing a child fails [Dr. Werner Fink] Early locale tracking as a compile-time option [tg] Fix regressions introduced with new fast character classes Bug: N/A Test: builds and boots Change-Id: I44da7a8bb9859a0357bcd59891dd4f2cfc199733
141 lines
3.8 KiB
Text
141 lines
3.8 KiB
Text
// Copyright © 2010, 2013
|
|
// Thorsten Glaser <t.glaser@tarent.de>
|
|
// This file is provided under the same terms as mksh.
|
|
|
|
cc_defaults {
|
|
name: "sh-defaults",
|
|
|
|
srcs: [
|
|
"src/lalloc.c",
|
|
"src/edit.c",
|
|
"src/eval.c",
|
|
"src/exec.c",
|
|
"src/expr.c",
|
|
"src/funcs.c",
|
|
"src/histrap.c",
|
|
"src/jobs.c",
|
|
"src/lex.c",
|
|
"src/main.c",
|
|
"src/misc.c",
|
|
"src/shf.c",
|
|
"src/syn.c",
|
|
"src/tree.c",
|
|
"src/var.c",
|
|
],
|
|
|
|
local_include_dirs: ["src"],
|
|
|
|
cflags: [
|
|
// Compiler flags...
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wno-deprecated-declarations",
|
|
"-fno-asynchronous-unwind-tables",
|
|
"-fno-strict-aliasing",
|
|
"-fstack-protector",
|
|
"-fwrapv",
|
|
|
|
// ...various options we choose
|
|
"-DDEBUG_LEAKS",
|
|
"-DMKSH_ASSUME_UTF8",
|
|
"-DMKSH_DONT_EMIT_IDSTRING",
|
|
"-DKSH_VERSIONNAME_VENDOR_EXT=\" Android\"",
|
|
|
|
// ...and the defines from Build.sh.
|
|
"-DMKSH_BUILDSH",
|
|
"-D_GNU_SOURCE",
|
|
"-DSETUID_CAN_FAIL_WITH_EAGAIN",
|
|
"-DHAVE_STRING_POOLING=1",
|
|
"-DHAVE_ATTRIBUTE_BOUNDED=1",
|
|
"-DHAVE_ATTRIBUTE_FORMAT=1",
|
|
"-DHAVE_ATTRIBUTE_NORETURN=1",
|
|
"-DHAVE_ATTRIBUTE_PURE=1",
|
|
"-DHAVE_ATTRIBUTE_UNUSED=1",
|
|
"-DHAVE_ATTRIBUTE_USED=1",
|
|
"-DHAVE_SYS_TIME_H=1",
|
|
"-DHAVE_TIME_H=1",
|
|
"-DHAVE_BOTH_TIME_H=1",
|
|
"-DHAVE_SYS_BSDTYPES_H=0",
|
|
"-DHAVE_SYS_FILE_H=1",
|
|
"-DHAVE_SYS_MKDEV_H=0",
|
|
"-DHAVE_SYS_MMAN_H=1",
|
|
"-DHAVE_SYS_PARAM_H=1",
|
|
"-DHAVE_SYS_RESOURCE_H=1",
|
|
"-DHAVE_SYS_SELECT_H=1",
|
|
"-DHAVE_SYS_SYSMACROS_H=1",
|
|
"-DHAVE_BSTRING_H=0",
|
|
"-DHAVE_GRP_H=1",
|
|
"-DHAVE_IO_H=0",
|
|
"-DHAVE_LIBGEN_H=1",
|
|
"-DHAVE_LIBUTIL_H=0",
|
|
"-DHAVE_PATHS_H=1",
|
|
"-DHAVE_STDINT_H=1",
|
|
"-DHAVE_STRINGS_H=1",
|
|
"-DHAVE_TERMIOS_H=1",
|
|
"-DHAVE_ULIMIT_H=0",
|
|
"-DHAVE_VALUES_H=0",
|
|
"-DHAVE_CAN_INTTYPES=1",
|
|
"-DHAVE_CAN_UCBINTS=1",
|
|
"-DHAVE_CAN_INT8TYPE=1",
|
|
"-DHAVE_CAN_UCBINT8=1",
|
|
"-DHAVE_RLIM_T=1",
|
|
"-DHAVE_SIG_T=1",
|
|
"-DHAVE_SYS_ERRLIST=0",
|
|
"-DHAVE_SYS_SIGNAME=1",
|
|
"-DHAVE_SYS_SIGLIST=1",
|
|
"-DHAVE_FLOCK=1",
|
|
"-DHAVE_LOCK_FCNTL=1",
|
|
"-DHAVE_GETRUSAGE=1",
|
|
"-DHAVE_GETSID=1",
|
|
"-DHAVE_GETTIMEOFDAY=1",
|
|
"-DHAVE_KILLPG=1",
|
|
"-DHAVE_MEMMOVE=1",
|
|
"-DHAVE_MKNOD=0",
|
|
"-DHAVE_MMAP=1",
|
|
"-DHAVE_FTRUNCATE=1",
|
|
"-DHAVE_NICE=1",
|
|
"-DHAVE_REVOKE=0",
|
|
"-DHAVE_SETLOCALE_CTYPE=1",
|
|
"-DHAVE_LANGINFO_CODESET=1",
|
|
"-DHAVE_SELECT=1",
|
|
"-DHAVE_SETRESUGID=1",
|
|
"-DHAVE_SETGROUPS=1",
|
|
"-DHAVE_STRERROR=1",
|
|
"-DHAVE_STRSIGNAL=0",
|
|
"-DHAVE_STRLCPY=1",
|
|
"-DHAVE_FLOCK_DECL=1",
|
|
"-DHAVE_REVOKE_DECL=1",
|
|
"-DHAVE_SYS_ERRLIST_DECL=0",
|
|
"-DHAVE_SYS_SIGLIST_DECL=1",
|
|
"-DHAVE_PERSISTENT_HISTORY=0",
|
|
"-DMKSH_BUILD_R=563",
|
|
|
|
// Additional flags
|
|
"-DMKSH_DEFAULT_PROFILEDIR=\"/system/etc\"",
|
|
"-DMKSHRC_PATH=\"/system/etc/mkshrc\"",
|
|
"-DMKSH_DEFAULT_EXECSHELL=\"/system/bin/sh\"",
|
|
"-DMKSH_DEFAULT_TMPDIR=\"/data/local\"",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "sh",
|
|
defaults: ["sh-defaults"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "sh_vendor",
|
|
defaults: ["sh-defaults"],
|
|
stem: "sh",
|
|
vendor: true,
|
|
cflags: [
|
|
// Additional flags for vendor variant
|
|
"-UMKSH_DEFAULT_PROFILEDIR",
|
|
"-UMKSHRC_PATH",
|
|
"-UMKSH_DEFAULT_EXECSHELL",
|
|
"-DMKSH_DEFAULT_PROFILEDIR=\"/vendor/etc\"",
|
|
"-DMKSHRC_PATH=\"/vendor/etc/mkshrc\"",
|
|
"-DMKSH_DEFAULT_EXECSHELL=\"/vendor/bin/sh\"",
|
|
"-DMKSH_DEFPATH_OVERRIDE=\"/vendor/bin:/vendor/xbin\"",
|
|
],
|
|
}
|