Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify target_cpu handling #9848

Merged
merged 1 commit into from
Jan 17, 2020
Merged

Unify target_cpu handling #9848

merged 1 commit into from
Jan 17, 2020

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Resolve some technical dept which makes detecting the target
architecture for conditional Makefiles overly difficult.

Description

Over the years several slightly different approaches were used
in the Makefiles to determine the target architecture. This
change updates both the build system and Makefile to handle
this in a consistent fashion.

TARGET_CPU is set to i386, x86_64, powerpc, aarch6 or sparc64
and made available in the Makefiles to be used as appropriate.

How Has This Been Tested?

Test built on x86_64 and ppc64. Pending CI build testing for arm,
aarch64, ppc, and i386.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

@behlendorf behlendorf added the Status: Work in Progress Not yet ready for general review label Jan 16, 2020
@behlendorf behlendorf mentioned this pull request Jan 16, 2020
6 tasks
@behlendorf behlendorf marked this pull request as ready for review January 16, 2020 17:23
@behlendorf
Copy link
Contributor Author

@freqlabs would you mind taking a look at this to verify it'll work with the FreeBSD changes.

@behlendorf behlendorf added Status: Code Review Needed Ready for review and testing and removed Status: Work in Progress Not yet ready for general review labels Jan 16, 2020
# Suppress unused but set variable warnings often due to ASSERTs
ccflags-y += $(NO_UNUSED_BUT_SET_VARIABLE)

# Suppress unused-value warnings in sparc64 architecture headers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also:
module/zcommon/Makefile.in
module/os/linux/zfs/Makefile.in

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be able to easily resolve the conflict in config/always-arch.m4 when I do the next rebase. It even reduces our diff by one line :)

Over the years several slightly different approachs were used
in the Makefiles to determine the target architecture.  This
change updates both the build system and Makefile to handle
this in a consistent fashion.

TARGET_CPU is set to i386, x86_64, powerpc, aarch6 or sparc64
and made available in the Makefiles to be used as appropriate.

Signed-off-by: Brian Behlendorf <[email protected]>
@behlendorf
Copy link
Contributor Author

Refreshed to update module/zcommon/Makefile.in and module/os/linux/zfs/Makefile.in for sparc64.

@codecov
Copy link

codecov bot commented Jan 17, 2020

Codecov Report

Merging #9848 into master will increase coverage by <1%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #9848    +/-   ##
========================================
+ Coverage      79%      80%   +<1%     
========================================
  Files         385      385            
  Lines      121644   121644            
========================================
+ Hits        96587    96849   +262     
+ Misses      25057    24795   -262
Flag Coverage Δ
#kernel 80% <ø> (ø) ⬆️
#user 67% <ø> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f12e42c...57d7c5b. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 17, 2020
@behlendorf behlendorf merged commit 70835c5 into openzfs:master Jan 17, 2020
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Over the years several slightly different approaches were used
in the Makefiles to determine the target architecture.  This
change updates both the build system and Makefile to handle
this in a consistent fashion.

TARGET_CPU is set to i386, x86_64, powerpc, aarch6 or sparc64
and made available in the Makefiles to be used as appropriate.

Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9848
@behlendorf behlendorf deleted the arch-unify branch April 19, 2021 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant