~vojtech-horky/helenos/coastline-qemu

« back to all changes in this revision

Viewing changes to hsct.sh

  • Committer: Vojtech Horky
  • Date: 2017-08-07 14:28:40 UTC
  • mfrom: (104.1.27 coastline)
  • Revision ID: vojtechhorky@users.sourceforge.net-20170807142840-nj7i0b2i0py5o5qh
MergeĀ upstreamĀ changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
3
#
4
 
# Copyright (c) 2013 Vojtech Horky
 
4
# Copyright (c) 2013-2017 Vojtech Horky
5
5
# All rights reserved.
6
6
#
7
7
# Redistribution and use in source and binary forms, with or without
500
500
        # Get the flags
501
501
        _CFLAGS=`hsct_get_var_from_uspace CFLAGS`
502
502
        _LDFLAGS=`hsct_get_var_from_uspace LFLAGS`
 
503
        _AFLAGS=`hsct_get_var_from_uspace AFLAGS`
 
504
        
 
505
        _CFLAGS_ORIGINAL=`hsct_get_var_from_uspace CFLAGS`
 
506
        _LDFLAGS_ORIGINAL=`hsct_get_var_from_uspace LFLAGS`
503
507
        
504
508
        # CC flags clean-up
505
509
        #_CFLAGS=`echo "$_CFLAGS" | sed 's#-imacros[ \t]*\([^ \t]*/config.h\)#-imacros '"$HSCT_CACHE_DIR"'/include/system_config.h#'`
606
610
        hsct_cache_variable HSCT_LDFLAGS "$_LDFLAGS"
607
611
        hsct_cache_variable HSCT_LDFLAGS_FOR_CC "$_LDFLAGS_FOR_CC"
608
612
        hsct_cache_variable HSCT_CFLAGS "$_CFLAGS"
 
613
        
 
614
        hsct_cache_variable HSCT_LDFLAGS_ORIGINAL "$_LDFLAGS_ORIGINAL $_POSIX_LINK_LFLAGS"
 
615
        hsct_cache_variable HSCT_CFLAGS_ORIGINAL "$_CFLAGS_ORIGINAL"
 
616
        hsct_cache_variable HSCT_LINKER_SCRIPT "$_LINKER_SCRIPT"
 
617
        
 
618
        hsct_cache_variable HSCT_LDFLAGS "-specs=$HSCT_CACHE_DIR/coastline.specs"
 
619
        hsct_cache_variable HSCT_LDFLAGS_FOR_CC "-specs=$HSCT_CACHE_DIR/coastline.specs"
 
620
        hsct_cache_variable HSCT_CFLAGS "-specs=$HSCT_CACHE_DIR/coastline.specs"
 
621
        hsct_cache_variable HSCT_CPPFLAGS "-specs=$HSCT_CACHE_DIR/coastline.specs"
 
622
        
 
623
        hsct_info2 "Building specs file for GCC"
 
624
        $HSCT_HOME/hsct-create-specs-file.py \
 
625
                "$HSCT_CACHE_DIR" \
 
626
                $_CFLAGS_ORIGINAL -I$HSCT_CACHE_DIR/include/posix -I$HSCT_CACHE_DIR/include/ \
 
627
                -- \
 
628
                $_AFLAGS \
 
629
                -- \
 
630
                $_LDFLAGS_ORIGINAL $_POSIX_LINK_LFLAGS -L$HSCT_CACHE_DIR/lib -n -T $_LINKER_SCRIPT \
 
631
                >helenos/coastline.specs
609
632
}
610
633
 
611
634
# Source the env.sh if present otherwise exit with failure.