changeset 100:36e0d3e7b62e

8072609: Fix build script to support gcc 4.6.x Summary: gcc 4.6 requires necessary libraries to be specified at the end of linker script. Reviewed-by: alkonsta
author snazarki
date Thu, 05 Feb 2015 14:55:43 +0400
parents 7e28d40db785
children a4559d391a7d
files Makefile README
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Feb 04 15:38:05 2015 +0300
+++ b/Makefile	Thu Feb 05 14:55:43 2015 +0400
@@ -1,5 +1,5 @@
 #########################################################################
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -190,7 +190,7 @@
 
 lib$(LIB_NAME).so: $(CPP_OBJ_FILES) $(C_OBJ_FILES) dirs
 	@echo linking $@
-	@$(TARGET_LD) $(TARGET_LD_FLAGS) -o $(SO_OUT_DIR)/$@ $(foreach o,$(CPP_OBJ_FILES) $(C_OBJ_FILES),$(NATIVE_OUT_DIR)/$(o))
+	@$(TARGET_LD) -o $(SO_OUT_DIR)/$@ $(foreach o,$(CPP_OBJ_FILES) $(C_OBJ_FILES),$(NATIVE_OUT_DIR)/$(o)) $(TARGET_LD_FLAGS)
 
 $(LIB_NAME).jar: $(JAVA_SRC_FILES) dirs
 	@echo Compiling Java source files to $(JAR_OUT_DIR)/$@
--- a/README	Wed Feb 04 15:38:05 2015 +0300
+++ b/README	Thu Feb 05 14:55:43 2015 +0400
@@ -16,8 +16,11 @@
   make
 
 To make build for i386 cpu arch on x86-64 platform following flags need to be set:
-  export USER_FLAGS = '-march=i386 -m32'
-  make TARGET_CPU_LEGACY_LIB=i386 USER_C_FLAGS=$(USER_FLAGS) USER_CXX_FLAGS=$(USER_FLAGS) USER_LD_FLAGS=$(USER_FLAGS) 
+   CPU_ARCH=i386
+   export USER_C_FLAGS="-march=$CPU_ARCH -m32"
+   export USER_CXX_FLAGS="-march=$CPU_ARCH -m32"
+   export USER_LD_FLAGS="-march=$CPU_ARCH -m32"
+   make  TARGET_CPU_LEGACY_LIB=$CPU_ARCH
 
 The resulting Device I/O library files should be found in build/jar and build/so