aboutsummaryrefslogtreecommitdiff
path: root/external/shared
AgeCommit message (Collapse)AuthorFilesLines
2016-09-22external: Utilize DESTDIR in shared makefilePatrick Williams1-6/+6
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-01Adopt libtool rules for soname versioning for libflashStewart Smith1-1/+18
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-27pflash: Clean up makefiles and resolve build raceJoel Stanley1-8/+15
The pflash build process has regressed from when the were last fixed in 6c21c4ffaf82. This patch resolves that issue and performs some cleanups: - Remove duplicated rules. Patches had moved rules into common files, but forgotten to remove them from the pflash makefiles. - Make assignements simply expanded variables where possible. Form the make manual: Functions referenced in the definition will be executed every time the variable is expanded. This makes make run slower; worse, it causes the wildcard and shell functions to give unpredictable results because you cannot easily control when they are called, or even how many times. To avoid all the problems and inconveniences of recursively expanded variables, there is another flavor: simply expanded variables. - set the 'shared' target as a dependency of the libflash objects. This was the final piece to resolve the race condition. The failed build could be reproduced by doing a `git clean -f -x` and then running the following: $ make -j 32 CROSS_COMPILE=arm-linux-gnueabi- SKIBOOT_VERSION=5.2.4 PFLASH_VERSION=5.2.4 V=1 -C external/pflash all LINKAGE=dynamic make: Entering directory '/home/joel/dev/skiboot/external/pflash' ln -sf ../../libflash ./libflash ln -sf ../../ccan ./ccan ln -sf ../common ./common cc -O2 -Wall -I. -c pflash.c -o pflash.o cc -O2 -Wall -I. -c progress.c -o progress.o make -C ../shared make[1]: Entering directory '/home/joel/dev/skiboot/external/shared' ln -sf ../../hw/ast-bmc/ast-sf-ctrl.c common/ast-sf-ctrl.c ln -sf ../../include/ast.h common/ast.h ln -sf arch_flash_arm_io.h common/io.h cc -O2 -Wall -I. -c common/arch_flash_common.c -o common-arch_flash_common.o cc -O2 -Wall -I. -c common/arch_flash_arm.c -o common-arch_flash_arm.o cc -O2 -Wall -I. -c common/ast-sf-ctrl.c -o common-ast-sf-ctrl.o cc -O2 -Wall -I. -c version.c -o version.o ld -r common-arch_flash_common.o common-arch_flash_arm.o common-ast-sf-ctrl.o -o common-arch_flash.o ln -sf ../../libflash ./libflash ln -sf ../../ccan ./ccan ln -sf ../common ./common make[1]: *** No rule to make target 'libflash/file.c', needed by 'libflash-file.o'. Stop. make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/joel/dev/skiboot/external/shared' rules.mk:25: recipe for target '../shared/libflash.so.skiboot-5.2.4-1-g9f13f64c322f-joel-dirty-d5873ce' failed make: *** [../shared/libflash.so.skiboot-5.2.4-1-g9f13f64c322f-joel-dirty-d5873ce] Error 2 Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-07external: Create shared rules.mkBrad Bishop2-5/+5
Building a dynamically linked pflash will need the shared library name. Export it here. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-07external: Remove -m64 from shared CFLAGS on ARMBrad Bishop1-1/+4
-m64 isn't an ARM flag. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-07external: Remove external/shared link targetsBrad Bishop1-12/+0
These are already defined just like we need them in common/rules.mk Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-17pflash: Allow building under yocto.Patrick Williams1-1/+0
The makefiles under external/* utilize the $(CROSS_COMPILE) variable to determine the cross-compiler prefix. In a few places, $(CROSS_COMPILE)gcc is called instead of $(CC). The issue with this is that yocto build passes some compile flags as part of $(CC) instead of $(CFLAGS), the most important of these is '--sysroot=...'. Without the proper --sysroot flag, pflash compile fails to find critical libc headers like stdio.h. This change delegates setting of $(CC) and $(LD) to external/common/rules.mk, which is widely used in the external tree, and ensures that: 1) $(CC) is used instead of $(CROSS_COMPILE)gcc. 2) CC is only set when not passed from the environment. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-15external: Add Makefile targets to install libflashSamuel Mendoza-Jonas2-0/+76
This adds a Makefile under external/shared to build libflash as a shared library and install it. This allows programs outside of the skiboot tree to link against libflash in order to access MTD devices (eg. Petitboot). Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>