Changeset 3012ae7 in mainline
- Timestamp:
- 2018-08-31T14:13:06Z (6 years ago)
- Parents:
- fa86fff
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-31 14:04:56)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-31 14:13:06)
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
rfa86fff r3012ae7 376 376 uspace/lib/c/test-libc 377 377 uspace/lib/label/test-liblabel 378 uspace/lib/math/test-libmath 378 379 uspace/lib/pcut/test-libpcut-* 379 380 uspace/lib/posix/gcc.specs -
HelenOS.config
rfa86fff r3012ae7 295 295 296 296 % Compiler 297 @ "gcc_cross" GNU C Compiler ( cross-compiler)297 @ "gcc_cross" GNU C Compiler (HelenOS-specific cross-compiler) 298 298 @ "clang" Clang 299 @ "gcc_helenos" GNU C Compiler (experimental HelenOS-specific cross-compiler)300 @ "gcc_native" GNU C Compiler (native)301 299 ! COMPILER (choice) 302 300 … … 313 311 @ "ia32" Intel IA-32 314 312 @ "mips32" MIPS 32-bit 315 ! [PLATFORM=abs32le& (COMPILER=gcc_cross|COMPILER=gcc_helenos)] CROSS_TARGET (choice)313 ! [PLATFORM=abs32le&COMPILER=gcc_cross] CROSS_TARGET (choice) 316 314 317 315 … … 425 423 426 424 % Use link-time optimization 427 ! [COMPILER=gcc_cross |COMPILER=gcc_native] CONFIG_LTO (n/y)425 ! [COMPILER=gcc_cross] CONFIG_LTO (n/y) 428 426 429 427 % Kernel RCU algorithm -
contrib/tools/random_check.sh
rfa86fff r3012ae7 50 50 ;; 51 51 s) 52 echo "COMPILER=gcc_native" >>"$PRUNE_CONFIG_FILE"53 echo "COMPILER=gcc_helenos" >>"$PRUNE_CONFIG_FILE"54 52 ;; 55 53 *|h) -
tools/autotool.py
rfa86fff r3012ae7 178 178 def get_target(config): 179 179 platform = None 180 gnu_target = None181 helenos_target = None182 180 target = None 183 181 cc_args = [] … … 188 186 189 187 if (config['CROSS_TARGET'] == "arm32"): 190 gnu_target = "arm-linux-gnueabi" 191 helenos_target = "arm-helenos" 188 target = "arm-helenos" 192 189 193 190 if (config['CROSS_TARGET'] == "ia32"): 194 gnu_target = "i686-pc-linux-gnu" 195 helenos_target = "i686-helenos" 191 target = "i686-helenos" 196 192 197 193 if (config['CROSS_TARGET'] == "mips32"): 198 194 cc_args.append("-mabi=32") 199 gnu_target = "mipsel-linux-gnu" 200 helenos_target = "mipsel-helenos" 195 target = "mipsel-helenos" 201 196 202 197 if (config['PLATFORM'] == "amd64"): 203 198 platform = config['PLATFORM'] 204 gnu_target = "amd64-unknown-elf" 205 helenos_target = "amd64-helenos" 199 target = "amd64-helenos" 206 200 207 201 if (config['PLATFORM'] == "arm32"): 208 202 platform = config['PLATFORM'] 209 gnu_target = "arm-linux-gnueabi" 210 helenos_target = "arm-helenos" 203 target = "arm-helenos" 211 204 212 205 if (config['PLATFORM'] == "ia32"): 213 206 platform = config['PLATFORM'] 214 gnu_target = "i686-pc-linux-gnu" 215 helenos_target = "i686-helenos" 207 target = "i686-helenos" 216 208 217 209 if (config['PLATFORM'] == "ia64"): 218 210 platform = config['PLATFORM'] 219 gnu_target = "ia64-pc-linux-gnu" 220 helenos_target = "ia64-helenos" 211 target = "ia64-helenos" 221 212 222 213 if (config['PLATFORM'] == "mips32"): … … 226 217 if ((config['MACHINE'] == "msim") or (config['MACHINE'] == "lmalta")): 227 218 platform = config['PLATFORM'] 228 gnu_target = "mipsel-linux-gnu" 229 helenos_target = "mipsel-helenos" 219 target = "mipsel-helenos" 230 220 231 221 if ((config['MACHINE'] == "bmalta")): 232 222 platform = "mips32eb" 233 gnu_target = "mips-linux-gnu" 234 helenos_target = "mips-helenos" 223 target = "mips-helenos" 235 224 236 225 if (config['PLATFORM'] == "mips64"): … … 240 229 if (config['MACHINE'] == "msim"): 241 230 platform = config['PLATFORM'] 242 gnu_target = "mips64el-linux-gnu" 243 helenos_target = "mips64el-helenos" 231 target = "mips64el-helenos" 244 232 245 233 if (config['PLATFORM'] == "ppc32"): 246 234 platform = config['PLATFORM'] 247 gnu_target = "ppc-linux-gnu" 248 helenos_target = "ppc-helenos" 235 target = "ppc-helenos" 249 236 250 237 if (config['PLATFORM'] == "riscv64"): 251 238 platform = config['PLATFORM'] 252 gnu_target = "riscv64-unknown-linux-gnu" 253 helenos_target = "riscv64-helenos" 239 target = "riscv64-helenos" 254 240 255 241 if (config['PLATFORM'] == "sparc64"): 256 242 platform = config['PLATFORM'] 257 gnu_target = "sparc64-linux-gnu" 258 helenos_target = "sparc64-helenos" 259 260 if (config['COMPILER'] == "gcc_helenos"): 261 target = helenos_target 262 else: 263 target = gnu_target 243 target = "sparc64-helenos" 264 244 265 245 return (platform, cc_args, target) … … 279 259 280 260 sys.stderr.write("ok\n") 261 262 def check_path_gcc(target): 263 "Check whether GCC for a given target is present in $PATH." 264 265 try: 266 subprocess.Popen([ "%s-gcc" % target, "--version" ], stdout = subprocess.PIPE, stderr = subprocess.PIPE).wait() 267 return True 268 except: 269 return False 281 270 282 271 def check_app_alternatives(alts, args, name, details): … … 561 550 cross_prefix = "/usr/local/cross" 562 551 563 # HelenOS cross-compiler prefix564 if ('CROSS_HELENOS_PREFIX' in os.environ):565 cross_helenos_prefix = os.environ['CROSS_HELENOS_PREFIX']566 else:567 cross_helenos_prefix = "/usr/local/cross-helenos"568 569 # Prefix binutils tools on Solaris570 if (os.uname()[0] == "SunOS"):571 binutils_prefix = "g"572 else:573 binutils_prefix = ""574 575 552 owd = sandbox_enter() 576 553 … … 593 570 "Please contact the developers of HelenOS."]) 594 571 595 path = "%s/%s/bin" % (cross_prefix, target) 596 597 # Compatibility with earlier toolchain paths. 598 if not os.path.exists(path): 599 if (config['COMPILER'] == "gcc_helenos"): 600 check_path = "%s/%s/%s" % (cross_helenos_prefix, platform, target) 601 if not os.path.exists(check_path): 602 print_error(TOOLCHAIN_FAIL) 603 path = "%s/%s/bin" % (cross_helenos_prefix, platform) 604 else: 605 check_path = "%s/%s/%s" % (cross_prefix, platform, target) 606 if not os.path.exists(check_path): 607 print_error(TOOLCHAIN_FAIL) 608 path = "%s/%s/bin" % (cross_prefix, platform) 572 path = None 573 574 if not check_path_gcc(target): 575 path = "%s/bin" % cross_prefix 609 576 610 577 common['TARGET'] = target … … 612 579 613 580 # Compiler 614 if (config['COMPILER'] == "gcc_cross" or config['COMPILER'] == "gcc_helenos"):581 if (config['COMPILER'] == "gcc_cross"): 615 582 check_gcc(path, prefix, common, PACKAGE_CROSS) 616 583 check_binutils(path, prefix, common, PACKAGE_CROSS) … … 622 589 check_common(common, "GXX") 623 590 common['CXX'] = common['GXX'] 624 625 if (config['COMPILER'] == "gcc_native"):626 check_gcc(None, "", common, PACKAGE_GCC)627 check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)628 629 check_common(common, "GCC")630 common['CC'] = common['GCC']631 common['CC_AUTOGEN'] = common['CC']632 591 633 592 if (config['COMPILER'] == "clang"): -
tools/toolchain.sh
rfa86fff r3012ae7 45 45 46 46 REAL_INSTALL=true 47 USE_HELENOS_TARGET= false47 USE_HELENOS_TARGET=true 48 48 49 49 check_error() { … … 60 60 echo 61 61 echo "Syntax:" 62 echo " $0 [--no-install] [-- helenos-target] <platform>"62 echo " $0 [--no-install] [--non-helenos-target] <platform>" 63 63 echo 64 64 echo "Possible target platforms are:" … … 89 89 echo "not want to run the script under the super user." 90 90 echo 91 echo "The --helenos-target will build HelenOS-specific toolchain" 92 echo "(i.e. it will use *-helenos triplet instead of *-linux-*)." 93 echo "Using the HelenOS-specific toolchain is still an experimental" 94 echo "feature that is not fully supported." 91 echo "The --non-helenos-target will build non-HelenOS-specific toolchain" 92 echo "(i.e. it will use *-linux-* triplet instead of *-helenos)." 93 echo "Using this toolchain for building HelenOS is not supported." 95 94 echo 96 95 … … 238 237 HELENOS_TARGET="${GNU_ARCH}-helenos" 239 238 240 # TODO: Clean up this mess.241 239 case "$1" in 242 "amd64")243 LINUX_TARGET="${GNU_ARCH}-unknown-elf"244 ;;245 "ia32" | "ia64")246 LINUX_TARGET="${GNU_ARCH}-pc-linux-gnu"247 ;;248 240 "arm32") 249 241 LINUX_TARGET="${GNU_ARCH}-linux-gnueabi" 250 ;;251 "riscv64")252 LINUX_TARGET="${GNU_ARCH}-unknown-linux-gnu"253 242 ;; 254 243 *) … … 283 272 fi 284 273 285 PREFIX="${CROSS_PREFIX} /${TARGET}"274 PREFIX="${CROSS_PREFIX}" 286 275 287 276 echo ">>> Removing previous content" … … 408 397 if $REAL_INSTALL ; then 409 398 echo ">>> Moving to the destination directory." 410 cleanup_dir "${PREFIX}" 411 echo mv "${INSTALL_DIR}/${PREFIX}" "${PREFIX}" 412 mv "${INSTALL_DIR}/${PREFIX}" "${PREFIX}" 399 echo cp -r -t "${PREFIX}" "${INSTALL_DIR}/${PREFIX}/"* 400 cp -r -t "${PREFIX}" "${INSTALL_DIR}/${PREFIX}/"* 413 401 fi 414 402 … … 429 417 shift 430 418 ;; 431 -- helenos-target)432 USE_HELENOS_TARGET= true419 --non-helenos-target) 420 USE_HELENOS_TARGET=false 433 421 shift 434 422 ;; -
tools/travis.sh
rfa86fff r3012ae7 46 46 h_get_arch_config_space() { 47 47 cat <<'EOF_CONFIG_SPACE' 48 amd64:amd64- unknown-elf:image.iso49 arm32/beagleboardxm:arm- linux-gnueabi:uImage.bin50 arm32/beaglebone:arm- linux-gnueabi:uImage.bin51 arm32/gta02:arm- linux-gnueabi:uImage.bin52 arm32/integratorcp:arm- linux-gnueabi:image.boot53 arm32/raspberrypi:arm- linux-gnueabi:uImage.bin54 ia32:i686- pc-linux-gnu:image.iso55 ia64/i460GX:ia64- pc-linux-gnu:image.boot56 ia64/ski:ia64- pc-linux-gnu:image.boot57 mips32/malta-be:mips- linux-gnu:image.boot58 mips32/malta-le:mipsel- linux-gnu:image.boot59 mips32/msim:mipsel- linux-gnu:image.boot60 ppc32:ppc- linux-gnu:image.iso61 sparc64/niagara:sparc64- linux-gnu:image.iso62 sparc64/ultra:sparc64- linux-gnu:image.iso48 amd64:amd64-helenos:image.iso 49 arm32/beagleboardxm:arm-helenos:uImage.bin 50 arm32/beaglebone:arm-helenos:uImage.bin 51 arm32/gta02:arm-helenos:uImage.bin 52 arm32/integratorcp:arm-helenos:image.boot 53 arm32/raspberrypi:arm-helenos:uImage.bin 54 ia32:i686-helenos:image.iso 55 ia64/i460GX:ia64-helenos:image.boot 56 ia64/ski:ia64-helenos:image.boot 57 mips32/malta-be:mips-helenos:image.boot 58 mips32/malta-le:mipsel-helenos:image.boot 59 mips32/msim:mipsel-helenos:image.boot 60 ppc32:ppc-helenos:image.iso 61 sparc64/niagara:sparc64-helenos:image.iso 62 sparc64/ultra:sparc64-helenos:image.iso 63 63 EOF_CONFIG_SPACE 64 64 } -
uspace/lib/posix/Makefile
rfa86fff r3012ae7 120 120 echo '# Generated file, do not modify.' >> $@.new 121 121 echo '# Do not forget to set HELENOS_EXPORT_ROOT.' >> $@.new 122 echo 'HELENOS_CROSS_PATH="$(shell dirname "$(CC)")"' >> $@.new122 echo 'HELENOS_CROSS_PATH="$(shell dirname `which "$(CC)"`)"' >> $@.new 123 123 echo 'HELENOS_ARCH="$(firstword $(subst -, ,$(TARGET)))"' >> $@.new 124 124 echo 'HELENOS_TARGET="$(TARGET)"' >> $@.new
Note:
See TracChangeset
for help on using the changeset viewer.