libuafs: Stop clobbering CFLAGS Currently, in the libuafs MakefileProto for every platform, CFLAGS is set to a bunch of flags, ignoring any CFLAGS set by the 'make' command-line provided by the user. Since most of the rest of the tree honors CFLAGS, it is confusing and can cause errors when src/libuafs ignore the user-set CFLAGS. One example of this breaking the build is when building RHEL RPMs for certain sub-architectures of the current machine. If you try to 'rpmbuild --target=i686' on 32-bit x86 RHEL 5, we will build with -march=i686 in the CFLAGS, which will be used to build most objects and is used in our configure tests. As a result, our configure tests will say that gcc atomic intrinsics are available. But when we go to build libuafs objects, we will not have -march=i686 in our CFLAGS, which causes (on RHEL 5) gcc to default to building for i386, which does not have gcc atomic intrinsics available. This causes build errors like this: libuafs.a(rx.o): In function `rx_atomic_test_and_clear_bit': [...]/BUILD/openafs-1.8.0/src/rx/rx_atomic.h:462: undefined reference to `__sync_fetch_and_and_4' To fix this, change the libuafs MakefileProtos to not set CFLAGS directly; instead, set them in a new variable UAFS_CFLAGS. Makefile.common then pulls those flags into MODULE_CFLAGS, which is used in our *_CCRULE build rules. While we are here, also move the common set of CFLAGS set by each platform's MakefileProto into Makefile.common. Now, each MakefileProto only needs to set CFLAGS that are specific to that platform, which ends up being very few (since most platforms were using the exact same set of CFLAGS). Relevant issue identified and analyzed by mbarbosa@sinenomine.net. Change-Id: I1bd21a6e7669137be3e5edee86227fd37f841d62 Reviewed-on: https://gerrit.openafs.org/13262 Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Build libuafs with libtool Use the standard program for building PIC and non-PIC object files, instead of rolling our own. This allows us to pull the build rules into the Makefile.common, leaving just compiler flags and similar in the MakefileProtos. This does change the build flags being used to compile these files somewhat -- the old CRULE1 and CRULEPIC used CC instead of CCOBJ or MT_CC, and did not pass MT_CFLAGS, but it should be safe to move to the standard compiler invocations. We can also eliminate the libuafs-specific 'OPTF' variable which expands to OPTMZ almost everywhere. Rename our COMMON_INCLUDE to MODULE_INCLUDE so it's picked up properly by the standard build rules; this will let us remove ${TOP_OBJDIR}/src/config and ${TOP_INCDIR} once the rest of the build rules in this Makefile are converted to use libtool, as those include directories are already added by COMMON_INCL in Makefile.config. As a side effect, we get rid of the LIBUAFS make variable -- all sites were defining it to libuafs.a anyway, so we can just hardcode it. We can also build a shared libuafs.la "for free". Don't install it anywhere just yet, though. Change-Id: I2bda2f40bbd0aa808c24e074d2d7bcd329f6b77e Reviewed-on: http://gerrit.openafs.org/11472 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: D Brashear <shadow@your-file-system.com>
Deorbit separate JUAFS build Since 80943970b8cfcdf3fc630b25804aebaea228bd73, when the web enhancements were enabled universally, there has no longer been a functional difference between the UAFS and JUAFS builds. Their object files are compiled using the same compilation rule, and the list of object files differed only by rx_kmutex.o (which is devoid of content) and xdr_int32.o (which is preumably an oversight). Save the extra build time by just reinstalling libuafs.a as libjuafs.a to preserve the existing interfaces. Additionally, drop the LIBJUAFS make variable -- all definitions set it to libjuafs.a. Similarly, the LIBJUAFS_FLAGS variable was unused and can be removed. Change-Id: I2074d5bc26e326db36b16e055431818ef1c69210 Reviewed-on: http://gerrit.openafs.org/11471 Reviewed-by: D Brashear <shadow@your-file-system.com> Tested-by: D Brashear <shadow@your-file-system.com>
Deorbit the netscape plugin Netscape hasn't been a thing since 2008. We would only try to build it if someone manually ran 'webinstall' in src/libuafs, and there is no documentation telling anyone to do so. It's dead, Jim. Change-Id: I7486ca33da7ff19f23f0d9f54f5fb4e7e3232540 Reviewed-on: http://gerrit.openafs.org/11470 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: D Brashear <shadow@your-file-system.com> Tested-by: D Brashear <shadow@your-file-system.com>
libuafs: honor debug vs optimize setting from configure OPTF should not be forced on if the user specified debugging. side effect: use the OPTMZ setting for the platform instead of hardcoding here. Change-Id: Ib1cd4afebbd037938e2ee18e3bfc347b3690277b Reviewed-on: http://gerrit.openafs.org/8136 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Add PIC variant for libuafs Build a libuafs that is built with PIC, so it can be used in shared libraries on all platforms. Also build PIC variants for libafsutil and libcmd, since we need them for a PIC libuafs anyway. Change-Id: I017fa22c3b4dd661123ea92da7b3e5b69ee5c170 Reviewed-on: http://gerrit.openafs.org/3896 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
DFBSD update dfbsd userland Add new sysnames. Fix some userland header inclusions, defend against kernel-mode ioctl interpretation when building UKERNEL. Add fragments missing from DFBSD MakefileProto template. Change-Id: I56659bfe43dc24ef8a158aaf486c9a6f23643002 Reviewed-on: http://gerrit.openafs.org/2619 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
libuafs: Add $(XCFLAGS) to CFLAGS on all platforms Only darwin had $(XCFLAGS) in the libuafs build for some reason. Add it to all platforms, so they get e.g. -Wall if so configured. Change-Id: Ifab39af3abf087932feb1b9085ccb26baaec3164 Reviewed-on: http://gerrit.openafs.org/1745 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
dragonfly-bsd-userland-20090427 LICENSE IPL10 FIXES 124702 add support for dragonflyBSD's userland