On Fri, 27 Dec 2024 at 07:54, Varatharajan, Deepesh via
lists.openembedded.org
<[email protected]> wrote:
> https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html
>
> Dropped:
> 0001-cargo-do-not-write-host-information-into-compilation.patch
> hardcodepaths.patch

You need to explain why the patches have been dropped, as they're both
marked 'Inappropriate'.

Have the issues been fixed upstream? How and where? Can you include
the pointers to the fixes?


> +diff --git a/vendor/cc-1.0.99/src/command_helpers.rs 
> b/vendor/cc-1.0.99/src/command_helpers.rs
> +index fe919a5239..2b1f442019 100644
> +--- a/vendor/cc-1.0.99/src/command_helpers.rs
> ++++ b/vendor/cc-1.0.99/src/command_helpers.rs
> +@@ -257,6 +257,7 @@ fn wait_on_child(
> + /// and store them in the output Object.
> + pub(crate) fn objects_from_files(files: &[Arc<Path>], dst: &Path) -> 
> Result<Vec<Object>, Error> {
> +     let mut objects = Vec::with_capacity(files.len());
> ++    let target_substring = ["rustc"];
> +     for file in files {
> +         let basename = file
> +             .file_name()
> +@@ -277,10 +278,29 @@ pub(crate) fn objects_from_files(files: &[Arc<Path>], 
> dst: &Path) -> Result<Vec<
> +             })?
> +             .to_string_lossy();
> +
> ++        // Function to find the position of the first occurrence of the 
> target substring
> ++        fn find_target_position(s: &str, targets: &[&str]) -> Option<usize> 
> {
> ++            let mut pos = None;
> ++            for target in targets {
> ++                if let Some(index) = s.rfind(target) {
> ++                    //If a target is found and pos is None, set it
> ++                        if pos.is_none() || index < pos.unwrap() {
> ++                            pos = Some(index);
> ++                        }
> ++                }
> ++            }
> ++            pos
> ++        }
> ++
> ++        let filtered_dirname = if let Some(pos) = 
> find_target_position(&dirname, &target_substring) {
> ++            dirname[pos..].to_string()  //Keep everything from the target 
> substring onwards
> ++        }  else {
> ++            dirname.to_string()  //If target substring is not found, keep 
> the original dirname
> ++        };
> +         // Hash the dirname. This should prevent conflicts if we have 
> multiple
> +         // object files with the same filename in different subfolders.
> +         let mut hasher = hash_map::DefaultHasher::new();
> +-        hasher.write(dirname.to_string().as_bytes());
> ++        hasher.write(filtered_dirname.as_bytes());
> +         let obj = dst
> +             .join(format!("{:016x}-{}", hasher.finish(), basename))
> +             .with_extension("o");

Similarly, why this patch has this new addition? Is there an upstream
discussion related to it somewhere, or is it just multiple versions of
the same crate all needing the same fix?

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#209109): 
https://lists.openembedded.org/g/openembedded-core/message/209109
Mute This Topic: https://lists.openembedded.org/mt/110301948/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to