summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/config_mk.pm2
-rw-r--r--source4/build/smb_build/makefile.pm5
-rw-r--r--source4/build/smb_build/output.pm23
3 files changed, 10 insertions, 20 deletions
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 79107c1c9b..6dfd105c25 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -15,7 +15,7 @@ use strict;
my $section_types = {
"EXT_LIB" => {
"LIBS" => "list",
- "CFLAGS" => "list",
+ "EXTRA_CFLAGS" => "string",
"CPPFLAGS" => "list",
"LDFLAGS" => "list",
},
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 636fa1fbc5..767edbd496 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -231,7 +231,6 @@ sub SharedLibrary($$)
}
$self->_prepare_list($ctx, "OBJ_LIST");
- $self->_prepare_list($ctx, "CFLAGS");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
@@ -316,7 +315,6 @@ sub MergedObj($$)
return unless $ctx->{TARGET};
$self->_prepare_list($ctx, "OBJ_LIST");
- $self->_prepare_list($ctx, "CFLAGS");
$self->_prepare_list($ctx, "DEPEND_LIST");
push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
@@ -337,7 +335,6 @@ sub ObjList($$)
push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
$self->_prepare_list($ctx, "OBJ_LIST");
- $self->_prepare_list($ctx, "CFLAGS");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->output("$ctx->{TARGET}: ");
$self->output("\$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n");
@@ -351,7 +348,6 @@ sub StaticLibrary($$)
push (@{$self->{static_libs}}, $ctx->{TARGET});
$self->_prepare_list($ctx, "OBJ_LIST");
- $self->_prepare_list($ctx, "CFLAGS");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_LIST");
@@ -407,7 +403,6 @@ sub Binary($$)
push (@{$self->{binaries}}, "bin/$ctx->{BINARY}");
$self->_prepare_list($ctx, "OBJ_LIST");
- $self->_prepare_list($ctx, "CFLAGS");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 848286946b..d344b8ef01 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -136,11 +136,6 @@ sub create_output($$)
$part->{OUTPUT_TYPE} = "OBJLIST";
}
- if (($part->{STANDARD_VISIBILITY} ne "default") and
- ($config->{visibility_attribute} eq "yes")) {
- $part->{EXTRA_CFLAGS} .= " -fvisibility=$part->{STANDARD_VISIBILITY}";
- }
-
generate_binary($part) if $part->{OUTPUT_TYPE} eq "BINARY";
generate_mergedobj($part) if $part->{OUTPUT_TYPE} eq "MERGEDOBJ";
generate_objlist($part) if $part->{OUTPUT_TYPE} eq "OBJLIST";
@@ -156,22 +151,22 @@ sub create_output($$)
foreach my $elem (values %{$part->{UNIQUE_DEPENDENCIES}}) {
next if $elem == $part;
- push(@{$part->{CPPFLAGS}}, @{$elem->{CPPFLAGS}}) if defined(@{$elem->{CPPFLAGS}});
- push(@{$part->{CFLAGS}}, @{$elem->{CFLAGS}}) if defined(@{$elem->{CFLAGS}});
+ push(@{$part->{CFLAGS}}, @{$elem->{CPPFLAGS}}) if defined(@{$elem->{CPPFLAGS}});
+ push(@{$part->{CFLAGS}}, $elem->{EXTRA_CFLAGS}) if defined($elem->{EXTRA_CFLAGS});
push(@{$part->{LINK_LIST}}, $elem->{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->{SUBSYSTEM_INIT_FUNCTIONS}}, $elem->{INIT_FUNCTION}) if
- defined($elem->{INIT_FUNCTION}) and
- $elem->{TYPE} ne "MODULE" and
- $part->{OUTPUT_TYPE} ne "SHARED_LIBRARY";
+ push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET});
}
}
foreach $part (values %{$depend}) {
- $part->{EXTRA_CFLAGS} .= " ".join(" ", @{$part->{CFLAGS}}) if defined($part->{CFLAGS});
- $part->{EXTRA_CFLAGS} .= " ".join(" ", @{$part->{CPPFLAGS}}) if defined($part->{CPPFLAGS});
+ $part->{EXTRA_CFLAGS} .= " " . join(' ', @{$part->{CFLAGS}}) if defined($part->{CFLAGS});
+ $part->{EXTRA_CFLAGS} .= " " . join(' ', @{$part->{CPPFLAGS}}) if defined($part->{CPPFLAGS});
+ if (($part->{STANDARD_VISIBILITY} ne "default") and
+ ($config->{visibility_attribute} eq "yes")) {
+ $part->{EXTRA_CFLAGS} .= " -fvisibility=$part->{STANDARD_VISIBILITY}";
+ }
}
return $depend;