Changes in / [c2a6983:39bcc99] in mainline


Ignore:
Files:
3 added
10 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    rc2a6983 r39bcc99  
    291291@ "gcc_cross" GNU C Compiler (cross-compiler)
    292292@ "gcc_native" GNU C Compiler (native)
    293 @ "gcc_helenos" GNU C Compiler (HelenOS-specific cross-compiler)
    294293@ "icc" Intel C Compiler
    295294@ "clang" Clang
     
    300299@ "gcc_native" GNU C Compiler (native)
    301300@ "icc" Intel C Compiler
    302 @ "gcc_helenos" GNU C Compiler (HelenOS-specific cross-compiler)
    303301! [PLATFORM=ia64] COMPILER (choice)
    304302
     
    306304@ "gcc_cross" GNU C Compiler (cross-compiler)
    307305@ "gcc_native" GNU C Compiler (native)
    308 @ "gcc_helenos" GNU C Compiler (HelenOS-specific cross-compiler)
    309306! [PLATFORM=mips32|PLATFORM=mips64|PLATFORM=ppc32] COMPILER (choice)
    310307
     
    312309@ "gcc_cross" GNU C Compiler (cross-compiler)
    313310@ "gcc_native" GNU C Compiler (native)
    314 @ "gcc_helenos" GNU C Compiler (HelenOS-specific cross-compiler)
    315311@ "clang" Clang
    316312! [PLATFORM=abs32le|PLATFORM=arm32|PLATFORM=sparc64] COMPILER (choice)
     
    323319@ "ia32" Intel IA-32
    324320@ "mips32" MIPS 32-bit
    325 ! [PLATFORM=abs32le&(COMPILER=gcc_cross|COMPILER=gcc_helenos)] CROSS_TARGET (choice)
     321! [PLATFORM=abs32le&COMPILER=gcc_cross] CROSS_TARGET (choice)
    326322
    327323
  • boot/Makefile.build

    rc2a6983 r39bcc99  
    7575endif
    7676
    77 ifeq ($(COMPILER),gcc_helenos)
    78         CFLAGS = $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    79         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    80 endif
    81 
    82 
    8377ifeq ($(COMPILER),icc)
    8478        CFLAGS = $(ICC_CFLAGS) $(EXTRA_CFLAGS)
  • kernel/Makefile

    rc2a6983 r39bcc99  
    167167
    168168ifeq ($(COMPILER),gcc_cross)
    169         CFLAGS = $(GCC_CFLAGS)
    170         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    171         INSTRUMENTATION = -finstrument-functions
    172 endif
    173 
    174 ifeq ($(COMPILER),gcc_helenos)
    175169        CFLAGS = $(GCC_CFLAGS)
    176170        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
  • tools/autotool.py

    rc2a6983 r39bcc99  
    186186        gnu_target = None
    187187        clang_target = None
    188         helenos_target = None
    189188        cc_args = []
    190189       
     
    196195                        gnu_target = "arm-linux-gnueabi"
    197196                        clang_target = "arm-unknown-linux"
    198                         helenos_target = "arm-helenos-gnueabi"
    199197               
    200198                if (config['CROSS_TARGET'] == "ia32"):
    201199                        gnu_target = "i686-pc-linux-gnu"
    202200                        clang_target = "i386-unknown-linux"
    203                         helenos_target = "i686-pc-helenos"
    204201               
    205202                if (config['CROSS_TARGET'] == "mips32"):
    206203                        gnu_target = "mipsel-linux-gnu"
    207204                        clang_target = "mipsel-unknown-linux"
    208                         helenos_target = "mipsel-helenos"
    209205                        common['CC_ARGS'].append("-mabi=32")
    210206       
     
    213209                gnu_target = "amd64-linux-gnu"
    214210                clang_target = "x86_64-unknown-linux"
    215                 helenos_target = "amd64-helenos"
    216211       
    217212        if (config['PLATFORM'] == "arm32"):
     
    219214                gnu_target = "arm-linux-gnueabi"
    220215                clang_target = "arm-unknown-linux"
    221                 helenos_target = "arm-helenos-gnueabi"
    222216       
    223217        if (config['PLATFORM'] == "ia32"):
     
    225219                gnu_target = "i686-pc-linux-gnu"
    226220                clang_target = "i386-unknown-linux"
    227                 helenos_target = "i686-pc-helenos"
    228221       
    229222        if (config['PLATFORM'] == "ia64"):
    230223                target = config['PLATFORM']
    231224                gnu_target = "ia64-pc-linux-gnu"
    232                 helenos_target = "ia64-pc-helenos"
    233225       
    234226        if (config['PLATFORM'] == "mips32"):
     
    240232                        gnu_target = "mipsel-linux-gnu"
    241233                        clang_target = "mipsel-unknown-linux"
    242                         helenos_target = "mipsel-helenos"
    243234               
    244235                if ((config['MACHINE'] == "bmalta")):
     
    246237                        gnu_target = "mips-linux-gnu"
    247238                        clang_target = "mips-unknown-linux"
    248                         helenos_target = "mips-helenos"
    249239       
    250240        if (config['PLATFORM'] == "mips64"):
     
    256246                        gnu_target = "mips64el-linux-gnu"
    257247                        clang_target = "mips64el-unknown-linux"
    258                         helenos_target = "mips64el-helenos"
    259248       
    260249        if (config['PLATFORM'] == "ppc32"):
     
    262251                gnu_target = "ppc-linux-gnu"
    263252                clang_target = "powerpc-unknown-linux"
    264                 helenos_target = "ppc-helenos"
    265253       
    266254        if (config['PLATFORM'] == "sparc64"):
     
    268256                gnu_target = "sparc64-linux-gnu"
    269257                clang_target = "sparc-unknown-linux"
    270                 helenos_target = "sparc64-helenos"
    271        
    272         return (target, cc_args, gnu_target, clang_target, helenos_target)
     258       
     259        return (target, cc_args, gnu_target, clang_target)
    273260
    274261def check_app(args, name, details):
     
    710697                cross_prefix = "/usr/local/cross"
    711698       
    712         # HelenOS cross-compiler prefix
    713         if ('CROSS_HELENOS_PREFIX' in os.environ):
    714                 cross_helenos_prefix = os.environ['CROSS_HELENOS_PREFIX']
    715         else:
    716                 cross_helenos_prefix = "/usr/local/cross-helenos"
    717        
    718699        # Prefix binutils tools on Solaris
    719700        if (os.uname()[0] == "SunOS"):
     
    738719                common['CC_ARGS'] = []
    739720                if (config['COMPILER'] == "gcc_cross"):
    740                         target, cc_args, gnu_target, clang_target, helenos_target = get_target(config)
     721                        target, cc_args, gnu_target, clang_target = get_target(config)
    741722                       
    742723                        if (target is None) or (gnu_target is None):
     
    746727                        path = "%s/%s/bin" % (cross_prefix, target)
    747728                        prefix = "%s-" % gnu_target
    748                        
    749                         check_gcc(path, prefix, common, PACKAGE_CROSS)
    750                         check_binutils(path, prefix, common, PACKAGE_CROSS)
    751                        
    752                         check_common(common, "GCC")
    753                         common['CC'] = common['GCC']
    754                         common['CC_ARGS'].extend(cc_args)
    755                
    756                 if (config['COMPILER'] == "gcc_helenos"):
    757                         target, cc_args, gnu_target, clang_target, helenos_target = get_target(config)
    758                        
    759                         if (target is None) or (helenos_target is None):
    760                                 print_error(["Unsupported compiler target for GNU GCC.",
    761                                              "Please contact the developers of HelenOS."])
    762                        
    763                         path = "%s/%s/bin" % (cross_helenos_prefix, target)
    764                         prefix = "%s-" % helenos_target
    765729                       
    766730                        check_gcc(path, prefix, common, PACKAGE_CROSS)
  • tools/toolchain.sh

    rc2a6983 r39bcc99  
    5555BINUTILS_VERSION="2.23.1"
    5656BINUTILS_RELEASE=""
    57 BINUTILS_PATCHES="toolchain-binutils-2.23.1.patch"
    5857GCC_VERSION="4.8.1"
    59 GCC_PATCHES="toolchain-gcc-4.8.1-targets.patch toolchain-gcc-4.8.1-headers.patch"
    6058GDB_VERSION="7.6.1"
    61 GDB_PATCHES="toolchain-gdb-7.6.patch"
    6259
    6360BASEDIR="`pwd`"
     
    6562GCC="gcc-${GCC_VERSION}.tar.bz2"
    6663GDB="gdb-${GDB_VERSION}.tar.bz2"
    67 
    68 REAL_INSTALL=true
    69 USE_HELENOS_TARGET=false
    70 INSTALL_DIR="${BASEDIR}/PKG"
    7164
    7265#
     
    142135        echo
    143136        echo "Syntax:"
    144         echo " $0 [--no-install] [--helenos-target] <platform>"
     137        echo " $0 <platform>"
    145138        echo
    146139        echo "Possible target platforms are:"
     
    159152        echo " 2-way      same as 'all', but 2-way parallel"
    160153        echo
    161         echo "The toolchain is installed into directory specified by the"
    162         echo "CROSS_PREFIX environment variable. If the variable is not"
    163         echo "defined, /usr/local/cross/ is used as default."
    164         echo
    165         echo "If --no-install is present, the toolchain still uses the"
    166         echo "CROSS_PREFIX as the target directory but the installation"
    167         echo "copies the files into PKG/ subdirectory without affecting"
    168         echo "the actual root file system. That is only useful if you do"
    169         echo "not want to run the script under the super user."
    170         echo
    171         echo "The --helenos-target will build HelenOS-specific toolchain"
    172         echo "(i.e. it will use *-helenos-* triplet instead of *-linux-*)."
    173         echo "This toolchain is installed into /usr/local/cross-helenos by"
    174         echo "default. The settings can be changed by setting environment"
    175         echo "variable CROSS_HELENOS_PREFIX."
     154        echo "The toolchain will be installed to the directory specified by"
     155        echo "the CROSS_PREFIX environment variable. If the variable is not"
     156        echo "defined, /usr/local/cross will be used by default."
    176157        echo
    177158       
     
    311292}
    312293
    313 patch_sources() {
    314         PATCH_FILE="$1"
    315         PATCH_STRIP="$2"
    316         DESC="$3"
    317        
    318         change_title "Patching ${DESC}"
    319         echo " >>> Patching ${DESC} with ${PATCH_FILE}"
    320        
    321         patch -t "-p${PATCH_STRIP}" <"$PATCH_FILE"
    322         check_error $? "Error patching ${DESC}."
    323 }
    324 
    325294prepare() {
    326295        show_dependencies
     
    337306}
    338307
    339 set_target_from_platform() {
    340         case "$1" in
    341                 "amd64")
    342                         LINUX_TARGET="amd64-linux-gnu"
    343                         HELENOS_TARGET="amd64-helenos"
    344                         ;;
    345                 "arm32")
    346                         LINUX_TARGET="arm-linux-gnueabi"
    347                         HELENOS_TARGET="arm-helenos-gnueabi"
    348                         ;;
    349                 "ia32")
    350                         LINUX_TARGET="i686-pc-linux-gnu"
    351                         HELENOS_TARGET="i686-pc-helenos"
    352                         ;;
    353                 "ia64")
    354                         LINUX_TARGET="ia64-pc-linux-gnu"
    355                         HELENOS_TARGET="ia64-pc-helenos"
    356                         ;;
    357                 "mips32")
    358                         LINUX_TARGET="mipsel-linux-gnu"
    359                         HELENOS_TARGET="mipsel-helenos"
    360                         ;;
    361                 "mips32eb")
    362                         LINUX_TARGET="mips-linux-gnu"
    363                         HELENOS_TARGET="mips-helenos"
    364                         ;;
    365                 "mips64")
    366                         LINUX_TARGET="mips64el-linux-gnu"
    367                         HELENOS_TARGET="mips64el-helenos"
    368                         ;;
    369                 "ppc32")
    370                         LINUX_TARGET="ppc-linux-gnu"
    371                         HELENOS_TARGET="ppc-helenos"
    372                         ;;
    373                 "ppc64")
    374                         LINUX_TARGET="ppc64-linux-gnu"
    375                         HELENOS_TARGET="ppc64-helenos"
    376                         ;;
    377                 "sparc64")
    378                         LINUX_TARGET="sparc64-linux-gnu"
    379                         HELENOS_TARGET="sparc64-helenos"
    380                         ;;
    381                 *)
    382                         check_error 1 "No target known for $1."
    383                         ;;
    384         esac
    385 }
    386 
    387308build_target() {
    388309        PLATFORM="$1"
    389         # This sets the *_TARGET variables
    390         set_target_from_platform "$PLATFORM"
    391         if $USE_HELENOS_TARGET; then
    392                 TARGET="$HELENOS_TARGET"
    393         else
    394                 TARGET="$LINUX_TARGET"
    395         fi
     310        TARGET="$2"
    396311       
    397312        WORKDIR="${BASEDIR}/${PLATFORM}"
     
    404319                CROSS_PREFIX="/usr/local/cross"
    405320        fi
    406         if [ -z "${CROSS_HELENOS_PREFIX}" ] ; then
    407                 CROSS_HELENOS_PREFIX="/usr/local/cross-helenos"
    408         fi
    409        
    410         if $USE_HELENOS_TARGET; then
    411                 PREFIX="${CROSS_HELENOS_PREFIX}/${PLATFORM}"
    412         else
    413                 PREFIX="${CROSS_PREFIX}/${PLATFORM}"
    414         fi
     321       
     322        PREFIX="${CROSS_PREFIX}/${PLATFORM}"
    415323       
    416324        echo ">>> Downloading tarballs"
     
    420328       
    421329        echo ">>> Removing previous content"
    422         $REAL_INSTALL && cleanup_dir "${PREFIX}"
     330        cleanup_dir "${PREFIX}"
    423331        cleanup_dir "${WORKDIR}"
    424332       
    425         $REAL_INSTALL && create_dir "${PREFIX}" "destination directory"
     333        create_dir "${PREFIX}" "destination directory"
    426334        create_dir "${OBJDIR}" "GCC object directory"
    427335       
     
    436344        unpack_tarball "${BASEDIR}/${GDB}" "GDB"
    437345       
    438         echo ">>> Applying patches"
    439         for p in $BINUTILS_PATCHES; do
    440                 patch_sources "${BASEDIR}/${p}" 0 "binutils"
    441         done
    442         for p in $GCC_PATCHES; do
    443                 patch_sources "${BASEDIR}/${p}" 0 "GCC"
    444         done
    445         for p in $GDB_PATCHES; do
    446                 patch_sources "${BASEDIR}/${p}" 0 "GDB"
    447         done
    448        
    449346        echo ">>> Processing binutils (${PLATFORM})"
    450347        cd "${BINUTILSDIR}"
     
    452349       
    453350        change_title "binutils: configure (${PLATFORM})"
    454         CFLAGS=-Wno-error ./configure \
    455                 "--target=${TARGET}" \
    456                 "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" \
    457                 --disable-nls --disable-werror
     351        CFLAGS=-Wno-error ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls --disable-werror
    458352        check_error $? "Error configuring binutils."
    459353       
    460354        change_title "binutils: make (${PLATFORM})"
    461         make all
    462         check_error $? "Error compiling binutils."
    463        
    464         change_title "binutils: install (${PLATFORM})"
    465         if $REAL_INSTALL; then
    466                 make install
    467         else
    468                 make install "DESTDIR=${INSTALL_DIR}"
    469         fi
    470         check_error $? "Error installing binutils."
    471        
     355        make all install
     356        check_error $? "Error compiling/installing binutils."
    472357       
    473358        echo ">>> Processing GCC (${PLATFORM})"
     
    476361       
    477362        change_title "GCC: configure (${PLATFORM})"
    478         PATH="$PATH:${INSTALL_DIR}/${PREFIX}/bin" "${GCCDIR}/configure" \
    479                 "--target=${TARGET}" \
    480                 "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" \
    481                 --with-gnu-as --with-gnu-ld --disable-nls --disable-threads \
    482                 --enable-languages=c,objc,c++,obj-c++ \
    483                 --disable-multilib --disable-libgcj --without-headers \
    484                 --disable-shared --enable-lto --disable-werror
     363        "${GCCDIR}/configure" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --without-headers --disable-shared --enable-lto --disable-werror
    485364        check_error $? "Error configuring GCC."
    486365       
    487366        change_title "GCC: make (${PLATFORM})"
    488         PATH="${PATH}:${PREFIX}/bin:${INSTALL_DIR}/${PREFIX}/bin" make all-gcc
    489         check_error $? "Error compiling GCC."
    490        
    491         change_title "GCC: install (${PLATFORM})"
    492         if $REAL_INSTALL; then
    493                 PATH="${PATH}:${PREFIX}/bin" make install-gcc
    494         else
    495                 PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install-gcc "DESTDIR=${INSTALL_DIR}"
    496         fi
    497         check_error $? "Error installing GCC."
    498        
     367        PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
     368        check_error $? "Error compiling/installing GCC."
    499369       
    500370        echo ">>> Processing GDB (${PLATFORM})"
     
    503373       
    504374        change_title "GDB: configure (${PLATFORM})"
    505         PATH="$PATH:${INSTALL_DIR}/${PREFIX}/bin" ./configure \
    506                 "--target=${TARGET}" \
    507                 "--prefix=${PREFIX}" "--program-prefix=${TARGET}-"
     375        ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-"
    508376        check_error $? "Error configuring GDB."
    509377       
    510378        change_title "GDB: make (${PLATFORM})"
    511         PATH="${PATH}:${PREFIX}/bin:${INSTALL_DIR}/${PREFIX}/bin" make all
    512         check_error $? "Error compiling GDB."
    513        
    514         change_title "GDB: make (${PLATFORM})"
    515         if $REAL_INSTALL; then
    516                 PATH="${PATH}:${PREFIX}/bin" make install
    517         else
    518                 PATH="${PATH}:${INSTALL_DIR}/${PREFIX}/bin" make install "DESTDIR=${INSTALL_DIR}"
    519         fi
    520         check_error $? "Error installing GDB."
    521        
     379        make all install
     380        check_error $? "Error compiling/installing GDB."
    522381       
    523382        cd "${BASEDIR}"
     
    530389        echo ">>> Cross-compiler for ${TARGET} installed."
    531390}
    532 
    533 while [ "$#" -gt 1 ]; do
    534         case "$1" in
    535                 --no-install)
    536                         REAL_INSTALL=false
    537                         shift
    538                         ;;
    539                 --helenos-target)
    540                         USE_HELENOS_TARGET=true
    541                         shift
    542                         ;;
    543                 *)
    544                         show_usage
    545                         ;;
    546         esac
    547 done
    548391
    549392if [ "$#" -lt "1" ]; then
     
    552395
    553396case "$1" in
    554         amd64|arm32|ia32|ia64|mips32|mips32eb|mips64|ppc32|ppc64|sparc64)
    555                 prepare
    556                 build_target "$1"
     397        "amd64")
     398                prepare
     399                build_target "amd64" "amd64-linux-gnu"
     400                ;;
     401        "arm32")
     402                prepare
     403                build_target "arm32" "arm-linux-gnueabi"
     404                ;;
     405        "ia32")
     406                prepare
     407                build_target "ia32" "i686-pc-linux-gnu"
     408                ;;
     409        "ia64")
     410                prepare
     411                build_target "ia64" "ia64-pc-linux-gnu"
     412                ;;
     413        "mips32")
     414                prepare
     415                build_target "mips32" "mipsel-linux-gnu"
     416                ;;
     417        "mips32eb")
     418                prepare
     419                build_target "mips32eb" "mips-linux-gnu"
     420                ;;
     421        "mips64")
     422                prepare
     423                build_target "mips64" "mips64el-linux-gnu"
     424                ;;
     425        "ppc32")
     426                prepare
     427                build_target "ppc32" "ppc-linux-gnu"
     428                ;;
     429        "ppc64")
     430                prepare
     431                build_target "ppc64" "ppc64-linux-gnu"
     432                ;;
     433        "sparc64")
     434                prepare
     435                build_target "sparc64" "sparc64-linux-gnu"
    557436                ;;
    558437        "all")
    559438                prepare
    560                 build_target "amd64"
    561                 build_target "arm32"
    562                 build_target "ia32"
    563                 build_target "ia64"
    564                 build_target "mips32"
    565                 build_target "mips32eb"
    566                 build_target "mips64"
    567                 build_target "ppc32"
    568                 build_target "ppc64"
    569                 build_target "sparc64"
     439                build_target "amd64" "amd64-linux-gnu"
     440                build_target "arm32" "arm-linux-gnueabi"
     441                build_target "ia32" "i686-pc-linux-gnu"
     442                build_target "ia64" "ia64-pc-linux-gnu"
     443                build_target "mips32" "mipsel-linux-gnu"
     444                build_target "mips32eb" "mips-linux-gnu"
     445                build_target "mips64" "mips64el-linux-gnu"
     446                build_target "ppc32" "ppc-linux-gnu"
     447                build_target "ppc64" "ppc64-linux-gnu"
     448                build_target "sparc64" "sparc64-linux-gnu"
    570449                ;;
    571450        "parallel")
    572451                prepare
    573                 build_target "amd64" &
    574                 build_target "arm32" &
    575                 build_target "ia32" &
    576                 build_target "ia64" &
    577                 build_target "mips32" &
    578                 build_target "mips32eb" &
    579                 build_target "mips64" &
    580                 build_target "ppc32" &
    581                 build_target "ppc64" &
    582                 build_target "sparc64" &
     452                build_target "amd64" "amd64-linux-gnu" &
     453                build_target "arm32" "arm-linux-gnueabi" &
     454                build_target "ia32" "i686-pc-linux-gnu" &
     455                build_target "ia64" "ia64-pc-linux-gnu" &
     456                build_target "mips32" "mipsel-linux-gnu" &
     457                build_target "mips32eb" "mips-linux-gnu" &
     458                build_target "mips64" "mips64el-linux-gnu" &
     459                build_target "ppc32" "ppc-linux-gnu" &
     460                build_target "ppc64" "ppc64-linux-gnu" &
     461                build_target "sparc64" "sparc64-linux-gnu" &
    583462                wait
    584463                ;;
    585464        "2-way")
    586465                prepare
    587                 build_target "amd64" &
    588                 build_target "arm32" &
    589                 wait
    590                
    591                 build_target "ia32" &
    592                 build_target "ia64" &
    593                 wait
    594                
    595                 build_target "mips32" &
    596                 build_target "mips32eb" &
    597                 wait
    598                
    599                 build_target "mips64" &
    600                 build_target "ppc32" &
    601                 wait
    602                
    603                 build_target "ppc64" &
    604                 build_target "sparc64" &
     466                build_target "amd64" "amd64-linux-gnu" &
     467                build_target "arm32" "arm-linux-gnueabi" &
     468                wait
     469               
     470                build_target "ia32" "i686-pc-linux-gnu" &
     471                build_target "ia64" "ia64-pc-linux-gnu" &
     472                wait
     473               
     474                build_target "mips32" "mipsel-linux-gnu" &
     475                build_target "mips32eb" "mips-linux-gnu" &
     476                wait
     477               
     478                build_target "mips64" "mips64el-linux-gnu" &
     479                build_target "ppc32" "ppc-linux-gnu" &
     480                wait
     481               
     482                build_target "ppc64" "ppc64-linux-gnu" &
     483                build_target "sparc64" "sparc64-linux-gnu" &
    605484                wait
    606485                ;;
  • uspace/Makefile.common

    rc2a6983 r39bcc99  
    248248endif
    249249
    250 ifeq ($(COMPILER),gcc_helenos)
    251         CFLAGS += $(GCC_CFLAGS) $(EXTRA_CFLAGS)
    252         DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    253 endif
    254 
    255250ifeq ($(COMPILER),gcc_native)
    256251        CFLAGS += $(GCC_CFLAGS) $(EXTRA_CFLAGS)
  • uspace/lib/posix/Makefile

    rc2a6983 r39bcc99  
    4242FIXED_C_LIBRARY = libc4posix.a
    4343
    44 REDEFS_HIDE_LIBC = redefs-hide-libc-symbols.list
    45 REDEFS_SHOW_LIBPOSIX = redefs-show-posix-symbols.list
     44REDEFS_HIDE_LIBC = redefs-hide-libc.xargs
     45REDEFS_SHOW_LIBPOSIX = redefs-show-posix.xargs
    4646COLLISIONS_LIST = collisions.list
    4747
     
    6161        source/locale.c \
    6262        source/math.c \
    63         source/pthread/condvar.c \
    64         source/pthread/keys.c \
    65         source/pthread/mutex.c \
    66         source/pthread/threads.c \
    6763        source/pwd.c \
    6864        source/signal.c \
     
    8581
    8682$(FIXED_C_LIBRARY): $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    87         $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@
    88         $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@
     83        ./tools/transform-symbols.sh \
     84                $(OBJCOPY) $(AR) echo \
     85                $(LIBC_FILE) $@ \
     86                $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    8987
    9088$(FIXED_POSIX_LIBRARY): $(LIBRARY).a $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    91         $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBRARY).a $@
    92         $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@
     89        ./tools/transform-symbols.sh \
     90                $(OBJCOPY) $(AR) echo \
     91                $(LIBRARY).a $@ \
     92                $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    9393
    9494$(REDEFS_HIDE_LIBC): $(COLLISIONS_LIST)
    95         sed 's/.*/& __helenos_libc_&/' <$(COLLISIONS_LIST) >$@
    96 
     95        ./tools/create-redefines.sh "" "__helenos_libc_" <$(COLLISIONS_LIST) >$@
     96       
    9797$(REDEFS_SHOW_LIBPOSIX): $(COLLISIONS_LIST)
    98         sed 's/.*/posix_& &/' <$(COLLISIONS_LIST) >$@
     98        ./tools/create-redefines.sh "posix_" "" <$(COLLISIONS_LIST) >$@
    9999
    100100$(COLLISIONS_LIST):
    101         find ./include/posix -name '*.h' -exec \
    102                 sed -n -e '/^#/d' -e 's/__POSIX_DEF__/\n&/gp' {} \; | \
    103                 sed -n -e 's/__POSIX_DEF__(\([^)]*\)).*/\1/p' | \
    104                 sort -u >$@
     101        ./tools/get-collision-list.sh ./include/posix >$@
  • uspace/lib/posix/include/posix/float.h

    rc2a6983 r39bcc99  
    6161        #undef FLT_RADIX
    6262        #define FLT_RADIX __FLT_RADIX__
    63         #undef FLT_MIN
    64         #define FLT_MIN __FLT_MIN__
    65         #undef FLT_MAX
    66         #define FLT_MAX __FLT_MAX__
    67         #undef FLT_EPSILON
    68         #define FLT_EPSILON __FLT_EPSILON__
    69         #undef FLT_MANT_DIG
    70         #define FLT_MANT_DIG __FLT_MANT_DIG__
    71         #undef LDBL_MANT_DIG
    72         #define LDBL_MANT_DIG __LDBL_MANT_DIG__
    7363#else
    7464/* For something else than GCC, following definitions are provided.
  • uspace/lib/posix/include/posix/stdint.h

    rc2a6983 r39bcc99  
    108108
    109109
    110 /*
    111  * Fast* and least* integer types.
    112  *
    113  * The definitions below are definitely safe if not the best.
    114  */
    115 typedef uint8_t uint_least8_t;
    116 typedef uint16_t uint_least16_t;
    117 typedef uint32_t uint_least32_t;
    118 typedef uint64_t uint_least64_t;
    119 
    120 typedef int8_t int_least8_t;
    121 typedef int16_t int_least16_t;
    122 typedef int32_t int_least32_t;
    123 typedef int64_t int_least64_t;
    124 
    125 typedef uint8_t uint_fast8_t;
    126 typedef uint16_t uint_fast16_t;
    127 typedef uint32_t uint_fast32_t;
    128 typedef uint64_t uint_fast64_t;
    129 
    130 typedef int8_t int_fast8_t;
    131 typedef int16_t int_fast16_t;
    132 typedef int32_t int_fast32_t;
    133 typedef int64_t int_fast64_t;
    134 
    135110#endif /* POSIX_STDINT_H_ */
    136111
  • uspace/lib/posix/include/posix/stdio.h

    rc2a6983 r39bcc99  
    123123
    124124extern void setvbuf(FILE *, void *, int, size_t);
    125 extern void setbuf(FILE *, void *);
     125
    126126
    127127/* POSIX specific stuff. */
  • uspace/lib/posix/include/posix/time.h

    rc2a6983 r39bcc99  
    104104extern char *__POSIX_DEF__(ctime_r)(const time_t *timer, char *buf);
    105105extern char *__POSIX_DEF__(ctime)(const time_t *timer);
    106 extern time_t time(time_t *t);
    107106
    108107/* Clocks */
  • uspace/lib/posix/source/internal/common.h

    rc2a6983 r39bcc99  
    3939#include <stdlib.h>
    4040
    41 #define not_implemented() do { \
    42                 static int __not_implemented_counter = 0; \
    43                 if (__not_implemented_counter == 0) { \
    44                         fprintf(stderr, "%s() not implemented in %s:%d, something will NOT work.\n", \
    45                                 __func__, __FILE__, __LINE__); \
    46                 } \
    47                 __not_implemented_counter++; \
    48         } while (0)
     41#define not_implemented() (fprintf(stderr, \
     42    "Function %s() in file %s at line %d is not implemented\n", \
     43    __func__, __FILE__, __LINE__), abort())
    4944
    5045/* A little helper macro to avoid typing this over and over. */
  • uspace/lib/posix/source/math.c

    rc2a6983 r39bcc99  
    4949        // TODO: low priority, just a compile-time dependency of binutils
    5050        not_implemented();
    51         return 0.0;
    5251}
    5352
     
    6261        // TODO: low priority, just a compile-time dependency of binutils
    6362        not_implemented();
    64         return 0.0;
    6563}
    6664
     
    7472        // TODO: Python dependency
    7573        not_implemented();
    76         return 0.0;
    7774}
    7875
     
    8784        // TODO: Python dependency
    8885        not_implemented();
    89         return 0.0;
    9086}
    9187
     
    9995        // TODO: Python dependency
    10096        not_implemented();
    101         return 0.0;
    10297}
    10398
     
    111106        // TODO: Python dependency
    112107        not_implemented();
    113         return 0.0;
    114108}
    115109
     
    124118        // TODO: Python dependency
    125119        not_implemented();
    126         return 0.0;
    127120}
    128121
     
    137130        // TODO: Python dependency
    138131        not_implemented();
    139         return 0.0;
    140132}
    141133
     
    149141        // TODO: Python dependency
    150142        not_implemented();
    151         return 0.0;
    152143}
    153144
     
    162153        // TODO: Python dependency
    163154        not_implemented();
    164         return 0.0;
    165155}
    166156
     
    174164        // TODO: Python dependency
    175165        not_implemented();
    176         return 0.0;
    177166}
    178167
     
    186175        // TODO: Python dependency
    187176        not_implemented();
    188         return 0.0;
    189177}
    190178
     
    198186        // TODO: Python dependency
    199187        not_implemented();
    200         return 0.0;
    201188}
    202189
  • uspace/lib/posix/source/stdlib.c

    rc2a6983 r39bcc99  
    6363        // TODO: low priority, just a compile-time dependency of binutils
    6464        not_implemented();
    65         return 0;
     65        return 1;
    6666}
    6767
  • uspace/lib/posix/source/unistd.c

    rc2a6983 r39bcc99  
    389389        // TODO: low priority, just a compile-time dependency of binutils
    390390        not_implemented();
    391         return -1;
    392391}
    393392
     
    400399        // TODO: low priority, just a compile-time dependency of binutils
    401400        not_implemented();
    402         return -1;
    403401}
    404402
     
    413411        // TODO: low priority, just a compile-time dependency of binutils
    414412        not_implemented();
    415         return -1;
    416413}
    417414
     
    426423        // TODO: low priority, just a compile-time dependency of binutils
    427424        not_implemented();
    428         return -1;
    429425}
    430426
     
    438434        // TODO: low priority, just a compile-time dependency of binutils
    439435        not_implemented();
    440         return -1;
    441436}
    442437
Note: See TracChangeset for help on using the changeset viewer.