From 8d7e2eb68c7c63ef36d24ce59953c20c2579aa5f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 16 Feb 2008 20:38:21 +0100 Subject: Reintroduce mergedobj support. (This used to be commit 1cf23c58411a9b8a9bb97016c27c10a218e73146) --- source4/build/smb_build/output.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/build/smb_build/output.pm') diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 4350370fbf..0ddb9e4efb 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -89,6 +89,17 @@ sub generate_shared_library($) $lib->{OUTPUT_SHARED_LIBRARY} = $lib->{TARGET_SHARED_LIBRARY}; } +sub generate_merged_obj($) +{ + my $lib = shift; + + my $link_name = $lib->{NAME}; + $link_name =~ s/^LIB//; + + $lib->{MERGED_OBJNAME} = lc($link_name).".o"; + $lib->{TARGET_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; +} + sub generate_static_library($) { my $lib = shift; @@ -153,6 +164,7 @@ sub create_output($$) generate_binary($part) if grep(/BINARY/, @{$part->{OUTPUT_TYPE}}); generate_shared_library($part) if grep(/SHARED_LIBRARY/, @{$part->{OUTPUT_TYPE}}); generate_static_library($part) if grep(/STATIC_LIBRARY/, @{$part->{OUTPUT_TYPE}}); + generate_merged_obj($part) if grep(/MERGED_OBJ/, @{$part->{OUTPUT_TYPE}}); $part->{OUTPUT} = $part->{"OUTPUT_" . @{$part->{OUTPUT_TYPE}}[0]}; $part->{TARGET} = $part->{"TARGET_" . @{$part->{OUTPUT_TYPE}}[0]}; } -- cgit From 51b0a285f02e1bc6187e64514f3f59f546bbecc5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Feb 2008 15:31:15 +0100 Subject: Avoid redetermining paths; use already stored values. (This used to be commit 0d223ddc39b7438dbce6716f1f00c29579a1f4c4) --- source4/build/smb_build/output.pm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'source4/build/smb_build/output.pm') diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 0ddb9e4efb..586ea121cb 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -85,8 +85,9 @@ sub generate_shared_library($) $lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}.\$($lib->{NAME}_VERSION)"; } - $lib->{TARGET_SHARED_LIBRARY} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}"; - $lib->{OUTPUT_SHARED_LIBRARY} = $lib->{TARGET_SHARED_LIBRARY}; + $lib->{RESULT_SHARED_LIBRARY} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}"; + $lib->{OUTPUT_SHARED_LIBRARY} = "-l$link_name"; + $lib->{TARGET_SHARED_LIBRARY} = $lib->{RESULT_SHARED_LIBRARY}; } sub generate_merged_obj($) @@ -97,7 +98,8 @@ sub generate_merged_obj($) $link_name =~ s/^LIB//; $lib->{MERGED_OBJNAME} = lc($link_name).".o"; - $lib->{TARGET_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; + $lib->{RESULT_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; + $lib->{TARGET_MERGED_OBJ} = $lib->{RESULT_MERGED_OBJ}; } sub generate_static_library($) @@ -113,11 +115,12 @@ sub generate_static_library($) $lib->{LIBRARY_NAME} = "lib".lc($link_name).".a"; if (defined($lib->{OBJ_FILES})) { - $lib->{TARGET_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}"; + $lib->{RESULT_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}"; + $lib->{TARGET_STATIC_LIBRARY} = $lib->{RESULT_STATIC_LIBRARY}; $lib->{STATICDIR} = 'bin/static'; $lib->{OUTPUT_STATIC_LIBRARY} = "-l".lc($link_name); } else { - $lib->{TARGET_STATIC_LIBRARY} = ""; + $lib->{RESULT_STATIC_LIBRARY} = ""; $lib->{OUTPUT_STATIC_LIBRARY} = ""; } } @@ -129,8 +132,9 @@ sub generate_binary($) $bin->{DEPEND_LIST} = []; push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_OBJ_LIST)"); - $bin->{DEBUGDIR} = "bin/"; - $bin->{TARGET_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}"; + $bin->{DEBUGDIR} = "bin"; + $bin->{RESULT_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}"; + $bin->{TARGET_BINARY} = $bin->{RESULT_BINARY}; $bin->{BINARY} = $bin->{NAME}; } -- cgit From 80cbff3d011ad9264462812f57991ed0393b385e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Feb 2008 16:02:33 +0100 Subject: Fix build with partial linking. (This used to be commit bfad9610c472e8d7e3656e19c8dbb6b85727dc13) --- source4/build/smb_build/output.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source4/build/smb_build/output.pm') diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 586ea121cb..67b905ef55 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -97,9 +97,14 @@ sub generate_merged_obj($) my $link_name = $lib->{NAME}; $link_name =~ s/^LIB//; - $lib->{MERGED_OBJNAME} = lc($link_name).".o"; - $lib->{RESULT_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; - $lib->{TARGET_MERGED_OBJ} = $lib->{RESULT_MERGED_OBJ}; + if (defined($lib->{OBJ_FILES})) { + $lib->{MERGED_OBJNAME} = lc($link_name).".o"; + $lib->{RESULT_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; + $lib->{TARGET_MERGED_OBJ} = $lib->{RESULT_MERGED_OBJ}; + } else { + $lib->{TARGET_MERGED_OBJ} = ""; + $lib->{RESULT_MERGED_OBJ} = ""; + } } sub generate_static_library($) @@ -121,6 +126,7 @@ sub generate_static_library($) $lib->{OUTPUT_STATIC_LIBRARY} = "-l".lc($link_name); } else { $lib->{RESULT_STATIC_LIBRARY} = ""; + $lib->{TARGET_STATIC_LIBRARY} = ""; $lib->{OUTPUT_STATIC_LIBRARY} = ""; } } -- cgit From 7dd064fcd9c41f19d43abaa9d994224b0e215edb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Feb 2008 17:08:54 +0100 Subject: Factor out common code that generates object lists. (This used to be commit ef14e1ab3267263d65c4c41cd3c0dab3680f4104) --- source4/build/smb_build/output.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build/smb_build/output.pm') diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 67b905ef55..33493eca2c 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -201,7 +201,7 @@ sub create_output($$) push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT}); push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS}); push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); - push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); + push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); } } -- cgit From 6e0522c3cae9c99b589db67727ee1256c6da82ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Feb 2008 18:55:37 +0100 Subject: Build complete static libraries. (This used to be commit 34e26f4eecdf5bca340133942b242969c4c16dff) --- source4/build/smb_build/output.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4/build/smb_build/output.pm') diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 33493eca2c..3d5f4466ca 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -136,7 +136,7 @@ sub generate_binary($) my $bin = shift; $bin->{DEPEND_LIST} = []; - push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_OBJ_LIST)"); + push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_FULL_OBJ_LIST)"); $bin->{DEBUGDIR} = "bin"; $bin->{RESULT_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}"; @@ -198,10 +198,14 @@ sub create_output($$) my $elem = $depend->{$_}; next if $elem == $part; - push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT}); push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS}); - push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); - push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); + push(@{$part->{LINK_FLAGS}}, @{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); + if (defined($elem->{OUTPUT_TYPE}) and @{$elem->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ") { + push (@{$part->{FULL_OBJ_LIST}}, $elem->{TARGET}); + } else { + push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT}); + push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); + } } } -- cgit From 094769618e180cae404f5951b969e9c6c778e421 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Feb 2008 19:46:27 +0100 Subject: Use implicit build system element creation for external libraries. (This used to be commit 3b08f190c9dd4567e684c804a22e2612f405bbec) --- source4/build/smb_build/output.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build/smb_build/output.pm') diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 3d5f4466ca..83be28e740 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -210,7 +210,7 @@ sub create_output($$) } foreach $part (values %{$depend}) { - if (($part->{STANDARD_VISIBILITY} ne "default") and + if (defined($part->{STANDARD_VISIBILITY}) and ($part->{STANDARD_VISIBILITY} ne "default") and ($config->{visibility_attribute} eq "yes")) { push(@{$part->{FINAL_CFLAGS}}, "-fvisibility=$part->{STANDARD_VISIBILITY}"); } -- cgit From 9368ea67cdbb0d1fe5ef2258cc7e8c20c66e6ecd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Feb 2008 03:57:30 +0100 Subject: Fix CFLAGS (caused problems on hosts without libgssapi installed on the system). (This used to be commit f6760fd161f568ef13a841a0210f130160a16c01) --- source4/build/smb_build/output.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build/smb_build/output.pm') diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 83be28e740..ff9afe8e8c 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -185,7 +185,7 @@ sub create_output($$) merge_array(\$part->{FINAL_CFLAGS}, $part->{CPPFLAGS}); merge_array(\$part->{FINAL_CFLAGS}, $part->{CFLAGS}); - foreach (@{$part->{UNIQUE_DEPENDENCIES_COMPILE}}) { + foreach (@{$part->{UNIQUE_DEPENDENCIES_ALL}}) { my $elem = $depend->{$_}; next if $elem == $part; -- cgit