Age | Commit message (Collapse) | Author |
|
Technically, '-l' linker options should be included only after the
objects which must link to the library. So when we include '-lpthread'
in the LDFLAGS variable, it gets placed too early (i.e., before the
io_paral.o object), and so the pthread linkage never occurs. The
following error probably only shows up with linkers that don't link
pthreads by default.
$ make tests V=1
...
gcc -I../../ubi-utils//include -I ../../include -lpthread -Wall -Wextra -Wwrite-strings -Wno-sign-compare -ffunction-sections -fdata-sections -Wl,--gc-sections -g -o /home/norris/git/mtd-utils/tests/ubi-tests/io_paral /home/norris/git/mtd-utils/tests/ubi-tests/io_paral.o /home/norris/git/mtd-utils/tests/ubi-tests/helpers.o libubi.a
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.o: In function `main':
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.c:287: undefined reference to `pthread_create'
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.c:295: undefined reference to `pthread_create'
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.c:303: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [/home/norris/git/mtd-utils/tests/ubi-tests/io_paral] Error 1
...
$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.22
...
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
...
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
... to avoid confusion when the local common.h shadows the top-level common.h.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
The ubi-utils/src/ subdir is tossed as it just complicates things for no
real gain. The dictionary.h header is relocated to the ubi-utils/include/
since other headers in there need it.
The top level clean is replaced with a `find -delete` on objects, so it
might prune more than necessary, but many projects now do this sort of
thing and no one complained there.
A "mkdep" helper generates the actual rule, and the variables are used
with "foreach" to expand these automatically.
The tests subdir is updated only to reflect the ubi-utils source move.
Otherwise, it is left untouched as making that non-recursive isn't really
worth the effort.
While we're gutting things, also through in kbuild style output while
building to make things more legible.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
|
|
The common.mk contains clean target that removes *.o and $(TARGETS). Thus, make
custom clean target only for libubi.a
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Restore ubi tools to their "original" state, which means to
the state they were before I stareted cleaning them up.
Instead, create a "new-utils" subdirectory and move my work
there.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
And add testing for this feature.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Add 2 new utilities to attach and detach UBI devices.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
... to tests/ubi-tests/
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Clean-up ubi-utils a little by moving tests to a proper place.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|