Commit graph

7 commits

Author SHA1 Message Date
Olivier Matz f83a3d3fa8 use SPDX tag for 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2018-05-25 10:47:06 +02:00
Luca Boccassi ffe2fe3a95 mk: sort libraries in dependency lists
In order to achieve reproducible builds, always use the same
order when listing object files to build dependencies lists.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-10-12 22:31:33 +02:00
Olivier Matz feb9f680cd mk: optimize directory dependencies
Before this patch, the management of dependencies between directories
had several issues:

- the generation of .depdirs, done at configuration is slow: it can take
  more than one minute on some slow targets (usually ~10s on a standard
  PC without -j).

- for instance, it is possible to express a dependency like:
  - app/foo depends on lib/librte_foo
  - and lib/librte_foo depends on app/bar
  But this won't work because the directories are traversed with a
  depth-first algorithm, so we have to choose between doing 'app' before
  or after 'lib'.

- the script depdirs-rule.sh is too complex.

- we cannot use "make -d" for debug, because the output of make is used for
  the generation of .depdirs.

This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.

After this commit, "make config" is almost immediate.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-03-27 23:28:43 +02:00
Thomas Monjalon 3c6a14f6b9 mk: fix link with CC
It appeared in commit 21cdc2e77a ("fix 32-bit link with gcc")
that linker options must be prefixed by -Wl, when using CC.
So CPU_LDFLAGS is prefixed in rte.lib.mk.
Then commit 815cfb7925 ("fix link of combined shared library using CC")
introduced another prefixing of CPU_LDFLAGS in rte.sharelib.mk,
included in lib/Makefile.
Because CPU_LDFLAGS is an exported variable, the prefixing is done twice.
Initial patch of commit 815cfb7925 had a workaround but it hasn't
been applied in favor of this proper fix.

Now variables are not overriden when prefixing.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-12-17 22:54:20 +01:00
Thomas Monjalon 221fb04df9 mk: fix build ignoring other installed versions
If some DPDK libraries are installed on the system, the linker was trying
to use them before searching in -L path.
The obscure reason is that we were prefixing -L with -Wl, to pass it
directly to the linker.
But -L is also a gcc option. And allowing gcc to process this option fixes
the issue.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-05-01 22:57:47 +02:00
Julien Courtat 0ca5de1ebf mk: fix EXTRA_LDFLAGS override
The GCC prefix -Wl was ignored because the command line value has higher priority.
It ended in impossibilty for GCC to pass parameters to LD.
The prefixed value must override the command line one.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Didier Pallard 5125f7652c mk: allow to build shared libraries
Add mk/rte.shared.mk and mk/rte.extshared.mk in framework to
   allow shared libraries compilation through framework

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2014-02-26 11:01:13 +01:00