diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2012-10-18 12:38:16 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2012-10-18 12:38:16 -0700 |
commit | 9b0e5f88d68898ccdbc090c0e157f81d472b30ce (patch) | |
tree | a7b17f3f9f0437b35e8653f1ccd84ac0b8a0d1cf | |
parent | 6cf3bfb9f246d8263aba0ef97c007fb7c7a2ce3f (diff) |
304.60304.60
-rw-r--r-- | Makefile | 48 | ||||
-rw-r--r-- | backup.c | 10 | ||||
-rw-r--r-- | dist-files.mk | 2 | ||||
-rw-r--r-- | files.c | 23 | ||||
-rw-r--r-- | files.h | 1 | ||||
-rw-r--r-- | misc.c | 10 | ||||
-rwxr-xr-x | rtld_test_Linux-armv7l-gnueabi | bin | 0 -> 3892 bytes | |||
-rwxr-xr-x | rtld_test_Linux-armv7l-gnueabihf | bin | 0 -> 5540 bytes | |||
-rw-r--r-- | utils.mk | 9 | ||||
-rw-r--r-- | version.mk | 2 |
10 files changed, 86 insertions, 19 deletions
@@ -53,22 +53,41 @@ NVIDIA_INSTALLER_PROGRAM_NAME = "nvidia-installer" NVIDIA_INSTALLER_VERSION := $(NVIDIA_VERSION) +# We only need to run the TLS test on Linux-x86 and Linux-x86_64 +ifeq ($(findstring Linux-x86,$(TARGET_OS)-$(TARGET_ARCH)),) + NEED_TLS_TEST = +else + NEED_TLS_TEST = 1 +endif + NCURSES_UI_C = ncurses-ui.c NCURSES_UI_SO = $(OUTPUTDIR)/nvidia-installer-ncurses-ui.so NCURSES_UI_SO_C = $(OUTPUTDIR)/g_$(notdir $(NCURSES_UI_SO:.so=.c)) -TLS_TEST_C = $(OUTPUTDIR)/g_tls_test.c -TLS_TEST_DSO_C = $(OUTPUTDIR)/g_tls_test_dso.c -TLS_TEST = tls_test_$(TARGET_OS)-$(TARGET_ARCH) -TLS_TEST_DSO_SO = tls_test_dso_$(TARGET_OS)-$(TARGET_ARCH).so +ifneq ($(NEED_TLS_TEST),) + TLS_TEST_C = $(OUTPUTDIR)/g_tls_test.c + TLS_TEST_DSO_C = $(OUTPUTDIR)/g_tls_test_dso.c + TLS_TEST = tls_test_$(TARGET_OS)-$(TARGET_ARCH) + TLS_TEST_DSO_SO = tls_test_dso_$(TARGET_OS)-$(TARGET_ARCH).so -TLS_TEST_32_C = $(OUTPUTDIR)/g_tls_test_32.c -TLS_TEST_DSO_32_C = $(OUTPUTDIR)/g_tls_test_dso_32.c -TLS_TEST_32 = tls_test_$(TARGET_OS)-x86 -TLS_TEST_DSO_SO_32 = tls_test_dso_$(TARGET_OS)-x86.so + TLS_TEST_32_C = $(OUTPUTDIR)/g_tls_test_32.c + TLS_TEST_DSO_32_C = $(OUTPUTDIR)/g_tls_test_dso_32.c + TLS_TEST_32 = tls_test_$(TARGET_OS)-x86 + TLS_TEST_DSO_SO_32 = tls_test_dso_$(TARGET_OS)-x86.so +else + TLS_TEST_C = + TLS_TEST_DSO_C = + TLS_TEST = + TLS_TEST_DSO_SO = + + TLS_TEST_32_C = + TLS_TEST_DSO_32_C = + TLS_TEST_32 = + TLS_TEST_DSO_SO_32 = +endif RTLD_TEST_C = $(OUTPUTDIR)/g_rtld_test.c -RTLD_TEST = rtld_test_$(TARGET_OS)-$(TARGET_ARCH) +RTLD_TEST = rtld_test_$(TARGET_OS)-$(TARGET_ARCH)$(if $(TARGET_ARCH_ABI),-$(TARGET_ARCH_ABI)) RTLD_TEST_32_C = $(OUTPUTDIR)/g_rtld_test_32.c RTLD_TEST_32 = rtld_test_$(TARGET_OS)-x86 @@ -123,6 +142,7 @@ common_cflags = -I. common_cflags += -imacros $(CONFIG_H) common_cflags += -I $(OUTPUTDIR) common_cflags += -I $(COMMON_UTILS_DIR) +common_cflags += $(if $(NEED_TLS_TEST),-DNV_TLS_TEST) CFLAGS += $(common_cflags) @@ -205,19 +225,21 @@ $(NCURSES_UI_SO): $(call BUILD_OBJECT_LIST,ncurses-ui.c) $(NCURSES_UI_SO_C): $(GEN_UI_ARRAY) $(NCURSES_UI_SO) $(call quiet_cmd,GEN_UI_ARRAY) $(NCURSES_UI_SO) ncurses_ui_array > $@ -$(TLS_TEST_C): $(GEN_UI_ARRAY) $(TLS_TEST) +ifneq ($(NEED_TLS_TEST),) + $(TLS_TEST_C): $(GEN_UI_ARRAY) $(TLS_TEST) $(call quiet_cmd,GEN_UI_ARRAY) $(TLS_TEST) tls_test_array > $@ -$(TLS_TEST_DSO_C): $(GEN_UI_ARRAY) $(TLS_TEST_DSO_SO) + $(TLS_TEST_DSO_C): $(GEN_UI_ARRAY) $(TLS_TEST_DSO_SO) $(call quiet_cmd,GEN_UI_ARRAY) \ $(TLS_TEST_DSO_SO) tls_test_dso_array > $@ -$(TLS_TEST_32_C): $(GEN_UI_ARRAY) $(TLS_TEST_32) + $(TLS_TEST_32_C): $(GEN_UI_ARRAY) $(TLS_TEST_32) $(call quiet_cmd,GEN_UI_ARRAY) $(TLS_TEST_32) tls_test_array_32 > $@ -$(TLS_TEST_DSO_32_C): $(GEN_UI_ARRAY) $(TLS_TEST_DSO_SO_32) + $(TLS_TEST_DSO_32_C): $(GEN_UI_ARRAY) $(TLS_TEST_DSO_SO_32) $(call quiet_cmd,GEN_UI_ARRAY) \ $(TLS_TEST_DSO_SO_32) tls_test_dso_array_32 > $@ +endif $(RTLD_TEST_C): $(GEN_UI_ARRAY) $(RTLD_TEST) $(call quiet_cmd,GEN_UI_ARRAY) $(RTLD_TEST) rtld_test_array > $@ @@ -502,6 +502,16 @@ int log_mkdir(Options *op, const char *dirs) { FILE *log; + /* + * create the backup directory if it doesn't exist; BACKUP_MKDIR_LOG + * is within BACKUP_DIRECTORY, so the below fopen(3) call depends on + * the existence of BACKUP_DIRECTORY + */ + if (!directory_exists(op, BACKUP_DIRECTORY) && + !mkdir_with_log(op, BACKUP_DIRECTORY, BACKUP_DIRECTORY_PERMS, FALSE)) { + return FALSE; + } + /* open the log file */ log = fopen(BACKUP_MKDIR_LOG, "a"); diff --git a/dist-files.mk b/dist-files.mk index 289bf07..d50c576 100644 --- a/dist-files.mk +++ b/dist-files.mk @@ -68,6 +68,8 @@ DIST_FILES += dist-files.mk DIST_FILES += rtld_test_Linux-x86 DIST_FILES += rtld_test_Linux-x86_64 +DIST_FILES += rtld_test_Linux-armv7l-gnueabi +DIST_FILES += rtld_test_Linux-armv7l-gnueabihf DIST_FILES += tls_test_Linux-ia64 DIST_FILES += tls_test_Linux-x86 @@ -1146,12 +1146,13 @@ int confirm_path(Options *op, const char *path) -/* - * mkdir_recursive() - create the path specified, also creating parent - * directories as needed; this is equivalent to `mkdir -p` +/* + * mkdir_with_log() - create the path specified, also creating parent + * directories as needed; this is equivalent to `mkdir -p`. Log created + * directories if the "log" parameter is set. */ -int mkdir_recursive(Options *op, const char *path, const mode_t mode) +int mkdir_with_log(Options *op, const char *path, const mode_t mode, int log) { char *c, *tmp, ch, *list, *tmplist; @@ -1185,7 +1186,7 @@ int mkdir_recursive(Options *op, const char *path, const mode_t mode) } while (*c); /* Log any created directories */ - if (list) { + if (log && list) { log_mkdir(op, list); } @@ -1193,6 +1194,18 @@ int mkdir_recursive(Options *op, const char *path, const mode_t mode) free(tmp); return TRUE; +} /* mkdir_with_log */ + + + +/* + * mkdir_recursive() - Wrap mkdir_with_log() to create the path specified + * with any needed parent directories. + */ + +int mkdir_recursive(Options *op, const char *path, const mode_t mode) +{ + return mkdir_with_log(op, path, mode, TRUE); } /* mkdir_recursive() */ @@ -40,6 +40,7 @@ int mode_string_to_mode(Options *op, char *s, mode_t *mode); char *mode_to_permission_string(mode_t mode); int directory_exists(Options *op, const char *dir); int confirm_path(Options *op, const char *path); +int mkdir_with_log(Options *op, const char *path, const mode_t mode, int log); int mkdir_recursive(Options *op, const char *path, const mode_t mode); char *get_symlink_target(Options *op, const char *filename); int install_file(Options *op, const char *srcfile, @@ -1309,6 +1309,7 @@ uint64_t get_installable_file_mask(Options *op) +#if defined(NV_TLS_TEST) /* * tls_test() - Starting with glibc 2.3, there is a new thread local * storage mechanism. To accomodate this, NVIDIA's OpenGL libraries @@ -1480,6 +1481,15 @@ static int tls_test_internal(Options *op, int which_tls, } /* test_tls_internal() */ +#else /* defined(NV_TLS_TEST) */ + +int tls_test(Options *op, int compat_32_libs) +{ + /* Assume the TLS test passed. */ + return TRUE; +} + +#endif /* defined(NV_TLS_TEST) */ /* diff --git a/rtld_test_Linux-armv7l-gnueabi b/rtld_test_Linux-armv7l-gnueabi Binary files differnew file mode 100755 index 0000000..604a02a --- /dev/null +++ b/rtld_test_Linux-armv7l-gnueabi diff --git a/rtld_test_Linux-armv7l-gnueabihf b/rtld_test_Linux-armv7l-gnueabihf Binary files differnew file mode 100755 index 0000000..be0eadb --- /dev/null +++ b/rtld_test_Linux-armv7l-gnueabihf @@ -100,6 +100,15 @@ else LIBDL_LIBS = endif +# This variable controls which floating-point ABI is targeted. For ARM, it +# defaults to "gnueabi" for softfp. Another option is "gnueabihf" for +# hard(fp). This is necessary to pick up the correct rtld_test binary. +# All other architectures default to empty. +ifeq ($(TARGET_ARCH),armv7l) + TARGET_ARCH_ABI ?= gnueabi +endif +TARGET_ARCH_ABI ?= + OUTPUTDIR ?= _out/$(TARGET_OS)_$(TARGET_ARCH) NV_QUIET_COMMAND_REMOVED_TARGET_PREFIX ?= @@ -1 +1 @@ -NVIDIA_VERSION = 304.51 +NVIDIA_VERSION = 304.60 |