Changeset ea42e44 in mainline for uspace/lib/posix/Makefile


Ignore:
Timestamp:
2018-02-08T19:33:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8192d8a
Parents:
2660ee3
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-07 18:23:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-08 19:33:49)
Message:

Third party build improvements.

Add HELENOS_ARCH, HELENOS_CXXFLAGS and HELENOS_LDLIBS variables,
split CPPFLAGS from CFLAGS, split LDLIBS from LDFLAGS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r2660ee3 rea42e44  
    103103EXPORT_LDFLAGS = \
    104104        -L$$(HELENOS_EXPORT_ROOT)/lib \
    105         --whole-archive -lc -lmath --no-whole-archive \
    106105        -T link.ld
    107106
     107EXPORT_LDLIBS = \
     108        -lmath -lc
     109
    108110EXPORT_CFLAGS = \
    109         $(EXPORT_CPPFLAGS) \
    110         $(addprefix -Xlinker , $(EXPORT_LDFLAGS))
     111        -specs $$(HELENOS_EXPORT_ROOT)/lib/gcc.specs
    111112
    112113include $(USPACE_PREFIX)/Makefile.common
     
    116117        echo '+ $(COMMON_CFLAGS)' >> $@.new
    117118        echo >> $@.new
     119        echo '*cpp:' >> $@.new
     120        echo '+ $(COMMON_CPPFLAGS)' >> $@.new
     121        echo >> $@.new
    118122        echo '*lib:' >> $@.new
    119         echo '--whole-archive -lc -lmath --no-whole-archive' >> $@.new
    120         echo >> $@.new
     123        echo '$(EXPORT_LDLIBS)' >> $@.new
    121124        mv $@.new $@
    122125
     
    137140        echo '# Do not forget to set HELENOS_EXPORT_ROOT.' >> $@.new
    138141        echo 'HELENOS_CROSS_PATH="$(shell dirname $(CC))"' >> $@.new
     142        echo 'HELENOS_ARCH="$(firstword $(subst -, ,$(TARGET)))"' >> $@.new
    139143        echo 'HELENOS_TARGET="$(TARGET)"' >> $@.new
    140144        echo 'HELENOS_CPPFLAGS="$(EXPORT_CPPFLAGS)"' >> $@.new
    141145        echo 'HELENOS_CFLAGS="$(EXPORT_CFLAGS)"' >> $@.new
     146        echo 'HELENOS_CXXFLAGS="$(EXPORT_CFLAGS)"' >> $@.new
    142147        echo 'HELENOS_LDFLAGS="$(EXPORT_LDFLAGS)"' >> $@.new
     148        echo 'HELENOS_LDLIBS="$(EXPORT_LDLIBS)"' >> $@.new
    143149        mv $@.new $@
    144150
Note: See TracChangeset for help on using the changeset viewer.