]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #30866 - jseyfried:fix_shadowed_use_visibility, r=nrc
authorbors <bors@rust-lang.org>
Mon, 1 Feb 2016 04:52:12 +0000 (04:52 +0000)
committerbors <bors@rust-lang.org>
Mon, 1 Feb 2016 04:52:12 +0000 (04:52 +0000)
This reverts PR #30324, fixing bug #30159 in which a public a glob import makes public any preceding imports that share a name with an item in the module being glob imported from.

For example,
```rust
pub fn f() {}
pub mod foo {
    fn f() {}
}

mod bar {
    use f;
    use f as g;
    pub use foo::*; // This makes the first import public but does not affect the second import.
}
```

This is a [breaking-change].

configure
mk/cfg/armv7-unknown-linux-gnueabihf.mk
mk/cfg/mips-unknown-linux-musl.mk [new file with mode: 0644]
mk/cfg/mipsel-unknown-linux-musl.mk [new file with mode: 0644]
src/liblibc
src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs
src/librustc_back/target/mips_unknown_linux_musl.rs [new file with mode: 0644]
src/librustc_back/target/mipsel_unknown_linux_musl.rs [new file with mode: 0644]
src/librustc_back/target/mod.rs
src/libstd/os/linux/raw.rs
src/libstd/sys/common/libunwind.rs

index 572e486f8164356a4004222deef1b29148a2841a..9576e36828a32ee3ff8719901863e550b7f46d02 100755 (executable)
--- a/configure
+++ b/configure
@@ -1164,7 +1164,7 @@ do
             ;;
 
 
-        *-musl)
+        x86_64-*-musl)
             if [ ! -f $CFG_MUSL_ROOT/lib/libc.a ]
             then
                 err "musl libc $CFG_MUSL_ROOT/lib/libc.a not found"
index 546c71f667ffa245d950d155e109e65969c46825..3efbad8642b8303afc65e29b6e3e802b620b4f23 100644 (file)
@@ -8,8 +8,8 @@ CFG_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).so
 CFG_STATIC_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).a
 CFG_LIB_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.so
 CFG_LIB_DSYM_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.dylib.dSYM
-CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS) -march=armv7
-CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS) -march=armv7
+CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS) -march=armv7-a
+CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS) -march=armv7-a
 CFG_GCCISH_CXXFLAGS_armv7-unknown-linux-gnueabihf := -fno-rtti $(CXXFLAGS)
 CFG_GCCISH_LINK_FLAGS_armv7-unknown-linux-gnueabihf := -shared -fPIC -g
 CFG_GCCISH_DEF_FLAG_armv7-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list=
diff --git a/mk/cfg/mips-unknown-linux-musl.mk b/mk/cfg/mips-unknown-linux-musl.mk
new file mode 100644 (file)
index 0000000..33528b9
--- /dev/null
@@ -0,0 +1,24 @@
+# mips-unknown-linux-musl configuration
+CC_mips-unknown-linux-musl=mips-linux-musl-gcc
+CXX_mips-unknown-linux-musl=mips-linux-musl-g++
+CPP_mips-unknown-linux-musl=mips-linux-musl-gcc -E
+AR_mips-unknown-linux-musl=mips-linux-musl-ar
+CFG_LIB_NAME_mips-unknown-linux-musl=lib$(1).so
+CFG_STATIC_LIB_NAME_mips-unknown-linux-musl=lib$(1).a
+CFG_LIB_GLOB_mips-unknown-linux-musl=lib$(1)-*.so
+CFG_LIB_DSYM_GLOB_mips-unknown-linux-musl=lib$(1)-*.dylib.dSYM
+CFG_JEMALLOC_CFLAGS_mips-unknown-linux-musl := -mips32r2 -msoft-float -mabi=32 $(CFLAGS)
+CFG_GCCISH_CFLAGS_mips-unknown-linux-musl := -Wall -g -fPIC -mips32r2 -msoft-float -mabi=32 $(CFLAGS)
+CFG_GCCISH_CXXFLAGS_mips-unknown-linux-musl := -fno-rtti $(CXXFLAGS)
+CFG_GCCISH_LINK_FLAGS_mips-unknown-linux-musl := -shared -fPIC -g -mips32r2 -msoft-float -mabi=32
+CFG_GCCISH_DEF_FLAG_mips-unknown-linux-musl := -Wl,--export-dynamic,--dynamic-list=
+CFG_LLC_FLAGS_mips-unknown-linux-musl :=
+CFG_INSTALL_NAME_mips-unknown-linux-musl =
+CFG_EXE_SUFFIX_mips-unknown-linux-musl =
+CFG_WINDOWSY_mips-unknown-linux-musl :=
+CFG_UNIXY_mips-unknown-linux-musl := 1
+CFG_LDPATH_mips-unknown-linux-musl :=
+CFG_RUN_mips-unknown-linux-musl=
+CFG_RUN_TARG_mips-unknown-linux-musl=
+RUSTC_FLAGS_mips-unknown-linux-musl :=
+CFG_GNU_TRIPLE_mips-unknown-linux-musl := mips-unknown-linux-musl
diff --git a/mk/cfg/mipsel-unknown-linux-musl.mk b/mk/cfg/mipsel-unknown-linux-musl.mk
new file mode 100644 (file)
index 0000000..db836b8
--- /dev/null
@@ -0,0 +1,24 @@
+# mipsel-unknown-linux-musl configuration
+CC_mipsel-unknown-linux-musl=mipsel-linux-musl-gcc
+CXX_mipsel-unknown-linux-musl=mipsel-linux-musl-g++
+CPP_mipsel-unknown-linux-musl=mipsel-linux-musl-gcc
+AR_mipsel-unknown-linux-musl=mipsel-linux-musl-ar
+CFG_LIB_NAME_mipsel-unknown-linux-musl=lib$(1).so
+CFG_STATIC_LIB_NAME_mipsel-unknown-linux-musl=lib$(1).a
+CFG_LIB_GLOB_mipsel-unknown-linux-musl=lib$(1)-*.so
+CFG_LIB_DSYM_GLOB_mipsel-unknown-linux-musl=lib$(1)-*.dylib.dSYM
+CFG_JEMALLOC_CFLAGS_mipsel-unknown-linux-musl := -mips32 -mabi=32 $(CFLAGS)
+CFG_GCCISH_CFLAGS_mipsel-unknown-linux-musl := -Wall -g -fPIC -mips32 -mabi=32 $(CFLAGS)
+CFG_GCCISH_CXXFLAGS_mipsel-unknown-linux-musl := -fno-rtti $(CXXFLAGS)
+CFG_GCCISH_LINK_FLAGS_mipsel-unknown-linux-musl := -shared -fPIC -g -mips32
+CFG_GCCISH_DEF_FLAG_mipsel-unknown-linux-musl := -Wl,--export-dynamic,--dynamic-list=
+CFG_LLC_FLAGS_mipsel-unknown-linux-musl :=
+CFG_INSTALL_NAME_mipsel-unknown-linux-musl =
+CFG_EXE_SUFFIX_mipsel-unknown-linux-musl :=
+CFG_WINDOWSY_mipsel-unknown-linux-musl :=
+CFG_UNIXY_mipsel-unknown-linux-musl := 1
+CFG_LDPATH_mipsel-unknown-linux-musl :=
+CFG_RUN_mipsel-unknown-linux-musl=
+CFG_RUN_TARG_mipsel-unknown-linux-musl=
+RUSTC_FLAGS_mipsel-unknown-linux-musl :=
+CFG_GNU_TRIPLE_mipsel-unknown-linux-musl := mipsel-unknown-linux-musl
index 91ff43c736de664f8d3cd351e148c09cdea6731e..30f70baa6cc1ba3ddebb55b988fafbad0c0cc810 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 91ff43c736de664f8d3cd351e148c09cdea6731e
+Subproject commit 30f70baa6cc1ba3ddebb55b988fafbad0c0cc810
index fed4649c985a6fc13beaf62c4458187c78fd9f64..dd61bd8757375467754491fe54d6873f64d0bf84 100644 (file)
@@ -23,7 +23,7 @@ pub fn target() -> Target {
 
         options: TargetOptions {
             features: "+v7,+vfp2,+neon".to_string(),
-            cpu: "cortex-a7".to_string(),
+            cpu: "cortex-a8".to_string(),
             .. base
         }
     }
diff --git a/src/librustc_back/target/mips_unknown_linux_musl.rs b/src/librustc_back/target/mips_unknown_linux_musl.rs
new file mode 100644 (file)
index 0000000..050fb91
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use target::{Target, TargetOptions};
+
+pub fn target() -> Target {
+    Target {
+        llvm_target: "mips-unknown-linux-musl".to_string(),
+        target_endian: "big".to_string(),
+        target_pointer_width: "32".to_string(),
+        arch: "mips".to_string(),
+        target_os: "linux".to_string(),
+        target_env: "musl".to_string(),
+        target_vendor: "unknown".to_string(),
+        options: TargetOptions {
+            cpu: "mips32r2".to_string(),
+            features: "+mips32r2,+soft-float".to_string(),
+            ..super::linux_base::opts()
+        }
+    }
+}
diff --git a/src/librustc_back/target/mipsel_unknown_linux_musl.rs b/src/librustc_back/target/mipsel_unknown_linux_musl.rs
new file mode 100644 (file)
index 0000000..383a0d8
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use target::{Target, TargetOptions};
+
+pub fn target() -> Target {
+    Target {
+        llvm_target: "mipsel-unknown-linux-musl".to_string(),
+        target_endian: "little".to_string(),
+        target_pointer_width: "32".to_string(),
+        arch: "mips".to_string(),
+        target_os: "linux".to_string(),
+        target_env: "musl".to_string(),
+        target_vendor: "unknown".to_string(),
+        options: TargetOptions {
+            cpu: "mips32".to_string(),
+            features: "+mips32".to_string(),
+            ..super::linux_base::opts()
+        }
+    }
+}
index 331ec4a82ac5131e8b389dc00b71145c1578f99d..39f05ba645e873e1ef5e0543b78e9cb9f887bacf 100644 (file)
@@ -420,6 +420,8 @@ macro_rules! load_specific {
             armv7_unknown_linux_gnueabihf,
             aarch64_unknown_linux_gnu,
             x86_64_unknown_linux_musl,
+            mips_unknown_linux_musl,
+            mipsel_unknown_linux_musl,
 
             i686_linux_android,
             arm_linux_androideabi,
index 953d0917141d10337b9b262009577691d889d31f..286823552c29b3aa0c91accb118e3a667bef7658 100644 (file)
@@ -93,11 +93,20 @@ mod arch {
     use os::raw::{c_long, c_ulong};
     use os::unix::raw::{gid_t, uid_t};
 
+    #[cfg(target_env = "musl")]
+    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
+    #[cfg(not(target_env = "musl"))]
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32;
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
+    #[cfg(target_env = "musl")]
+    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
+    #[cfg(not(target_env = "musl"))]
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u32;
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32;
+    #[cfg(target_env = "musl")]
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32;
+    #[cfg(not(target_env = "musl"))]
+    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
     #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32;
 
     #[repr(C)]
index 77d1eed96231df0626e517e679c4657e59ab03c6..179a27a2ec86c8ea845963d5aa654c873c0ae26b 100644 (file)
@@ -101,9 +101,10 @@ pub enum _Unwind_Context {}
                       exception: *mut _Unwind_Exception);
 
 #[cfg_attr(any(all(target_os = "linux", not(target_env = "musl")),
-               target_os = "freebsd"),
+               target_os = "freebsd",
+               all(target_os = "linux", target_env = "musl", not(target_arch = "x86_64"))),
            link(name = "gcc_s"))]
-#[cfg_attr(all(target_os = "linux", target_env = "musl", not(test)),
+#[cfg_attr(all(target_os = "linux", target_env = "musl", target_arch = "x86_64", not(test)),
            link(name = "unwind", kind = "static"))]
 #[cfg_attr(any(target_os = "android", target_os = "openbsd"),
            link(name = "gcc"))]